1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-07 22:36:53 +03:00

Clean up nix files

This commit is contained in:
Nicolas Mattia 2019-01-28 19:48:51 +01:00
parent e5e65efd09
commit e1231e1341
3 changed files with 18 additions and 17 deletions

View File

@ -1,17 +1,2 @@
with { fetch = import ./nix/fetch.nix; };
let
# The (pinned) Nixpkgs where the original packages are sourced from
pkgs = import fetch.nixpkgs {};
# The list of packages to be installed
shellPackages = [ snack-exe ];
snack-exe = (import fetch.snack).snack-exe;
snack-lib = (import fetch.snack).snack-lib;
in
if pkgs.lib.inNixShell
then pkgs.mkShell
{ buildInputs = shellPackages;
}
else snack-lib.inferHPackBuild ./package.yaml
with { pkgs = import ./nix; };
pkgs.snack-lib.inferHPackBuild ./package.yaml

12
nix/default.nix Normal file
View File

@ -0,0 +1,12 @@
with { fetch = import ./fetch.nix; };
import fetch.nixpkgs
{ overlays =
[ (self: super:
{
snack-exe = (import fetch.snack).snack-exe;
snack-lib = (import fetch.snack).snack-lib;
}
)
] ;
config = { } ;
}

4
shell.nix Normal file
View File

@ -0,0 +1,4 @@
with { pkgs = import ./nix; };
pkgs.mkShell
{ buildInputs = [ pkgs.snack-exe ];
}