aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix42
1 files changed, 34 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index 1cf206c..98db874 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,10 +1,21 @@
{
description = "A Nix build Scheduler";
- inputs.nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
+ inputs = {
+ nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
+
+ nix = {
+ url = "github:NixOS/nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
outputs =
- { self, nixpkgs }:
+ {
+ self,
+ nixpkgs,
+ nix,
+ }:
let
lib = nixpkgs.lib;
@@ -15,7 +26,7 @@
pkgs = import nixpkgs { inherit system; };
};
- supportedSystems = lib.systems.flakeExposed;
+ supportedSystems = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
forAllSystems = f: lib.genAttrs supportedSystems (forSystem f);
in
{
@@ -38,6 +49,13 @@
linuxKernel.packages.linux_6_6.perf
hyperfine
nix-eval-jobs
+
+ pyright
+ (python3.withPackages (p: [
+ p.scipy
+ p.tqdm
+ p.scikit-learn
+ ]))
];
shellHook = ''
@@ -49,19 +67,24 @@
packages = forAllSystems (
{ system, pkgs }:
+ let
+ nixPkg = nix.packages.${system}.nix;
+ in
{
default = self.packages.${system}.evanix;
- evanix = pkgs.callPackage ./package.nix { };
+ evanix = pkgs.callPackage ./package.nix { nix = nixPkg; };
evanix-asan = self.packages.${system}.evanix.overrideAttrs (
_: previousAttrs: {
mesonFlags = previousAttrs.mesonFlags ++ [ (lib.mesonOption "b_sanitize" "address") ];
}
);
- evanix-py = pkgs.python3Packages.callPackage ./python-package.nix { };
+ evanix-py = pkgs.python3Packages.callPackage ./python-package.nix { nix = nixPkg; };
pythonWithEvanix =
let
- wrapper = pkgs.python3.withPackages (ps: [ (ps.callPackage ./python-package.nix { }) ]);
+ wrapper = pkgs.python3.withPackages (ps: [
+ (ps.callPackage ./python-package.nix { nix = nixPkg; })
+ ]);
in
wrapper.overrideAttrs (oldAttrs: {
makeWrapperArgs = oldAttrs.makeWrapperArgs or [ ] ++ [
@@ -74,9 +97,12 @@
}
);
legacyPackages = forAllSystems (
- { pkgs, ... }:
+ { pkgs, system, ... }:
+ let
+ nixPkg = nix.packages.${system}.nix;
+ in
{
- nixosTests = pkgs.callPackage ./nixos/tests/all-tests.nix { };
+ nixosTests = pkgs.callPackage ./nixos/tests/all-tests.nix { nix = nixPkg; };
}
);
checks = forAllSystems (