diff --git a/default.nix b/default.nix index 226f2a6..8a370c0 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,5 @@ -{ pkgs ? import ./pkgs.nix }: +args@{ pkgs ? import ./nix args, ... }: { - inherit (pkgs) arion; - tests = pkgs.callPackage ./tests {}; + inherit (pkgs) arion tests; } diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 0000000..4c25cf1 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,13 @@ +/** + * This is the entry-point for all nix execution in this project. + */ +{ nixpkgsSrc ? ./nixpkgs.nix, ... }: +import (import ./nixpkgs.nix) { + # Makes the config pure as well. See /top-level/impure.nix: + config = { + }; + overlays = [ + # all the packages are defined there: + (import ./overlay.nix) + ]; +} diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix new file mode 100644 index 0000000..4c64290 --- /dev/null +++ b/nix/nixpkgs.nix @@ -0,0 +1,5 @@ +# to update: $ nix-prefetch-url --unpack url +builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/be445a9074f139d63e704fa82610d25456562c3d.tar.gz"; + sha256 = "15dc7gdspimavcwyw9nif4s59v79gk18rwsafylffs9m1ld2dxwa"; +} diff --git a/nix/overlay.nix b/nix/overlay.nix new file mode 100644 index 0000000..7386daa --- /dev/null +++ b/nix/overlay.nix @@ -0,0 +1,4 @@ +self: super: { + arion = super.callPackage ../arion.nix {}; + tests = super.callPackage ../tests {}; +} diff --git a/pkgs.nix b/pkgs.nix deleted file mode 100644 index f608d1a..0000000 --- a/pkgs.nix +++ /dev/null @@ -1,3 +0,0 @@ -import { - overlays = [ (self: super: { arion = super.callPackage ./arion.nix {}; }) ]; -}