-
Notifications
You must be signed in to change notification settings - Fork 21
/
default.nix
51 lines (45 loc) · 1.23 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ pkgs ? import ./nixpkgs-pinned.nix {} }:
let
lib = pkgs.lib;
haskellPackages = import ./haskell-pkgs.nix {
inherit pkgs;
};
static = pkgs.haskell.lib.justStaticExecutables haskellPackages.yarn2nix;
yarn2nix = pkgs.stdenv.mkDerivation {
name = "yarn2nix";
src = "${pkgs.nix-gitignore.gitignoreSource [
".git/"
] ./yarn2nix}";
outputs = [ "bin" "doc" "out" ];
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
install -D --target-directory=$bin/bin ${static}/bin/*
${pkgs.skawarePackages.cleanPackaging.commonFileActions {
noiseFiles = [
".gitignore"
"tests/*"
"src/*"
"Main.hs"
"Setup.hs"
"package.yaml"
"yarn2nix.cabal"
".envrc"
"Repl.hs"
"yarn2nix.nix"
"NodePackageTool.hs"
"nix-lib"
];
docFiles = [
"README.md"
"LICENSE"
"CHANGELOG.md"
];
}} "$doc/share/yarn2nix"
${pkgs.skawarePackages.cleanPackaging.checkForRemainingFiles}
'';
passthru.nixLib = import ./yarn2nix/nix-lib {
inherit lib pkgs;
inherit yarn2nix;
};
};
in yarn2nix