-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnowflake.nix
30 lines (26 loc) · 847 Bytes
/
snowflake.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
{stdenvNoCC, makeWrapper, bash, coreutils, perl}:
let
perlWithPackages = perl.withPackages (p: [
p.DBDSQLite
p.DBI
]);
in
stdenvNoCC.mkDerivation rec {
name = "snowflake-${version}";
version = "0.0.0";
buildInputs = [makeWrapper];
phases = ["unpackPhase" "installPhase"];
unpackPhase = ''
mkdir --parents $out/share/lib
cp --recursive ${./bin} $out/share/bin
cp --recursive ${./lib} $out/share/lib/Snowflake
'';
installPhase = ''
mkdir --parents $out/bin
makeWrapper ${perlWithPackages}/bin/perl $out/bin/snowflake \
--set SNOWFLAKE_BASH_PATH ${bash}/bin/bash \
--set SNOWFLAKE_CP_PATH ${coreutils}/bin/cp \
--set SNOWFLAKE_LIB_PATH $out/share/lib \
--add-flags $out/share/bin/snowflake.pl
'';
}