mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Add shell.nix
This commit is contained in:
parent
d1da6967b8
commit
09191caea8
3 changed files with 35 additions and 20 deletions
18
dev-shell
18
dev-shell
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
if [ -e tests/test-tmp ]; then
|
|
||||||
chmod -R u+w tests/test-tmp
|
|
||||||
rm -rf tests/test-tmp
|
|
||||||
fi
|
|
||||||
|
|
||||||
s=$(type -p nix-shell)
|
|
||||||
exec $s release.nix -A tarball --command "
|
|
||||||
unset http_proxy
|
|
||||||
export NIX_REMOTE=$NIX_REMOTE
|
|
||||||
export NIX_PATH='$NIX_PATH'
|
|
||||||
export NIX_BUILD_SHELL=$(type -p bash)
|
|
||||||
export c=\$configureFlags
|
|
||||||
exec $s release.nix -A build.$(if [ $(uname -s) = Darwin ]; then echo x86_64-darwin; elif [[ $(uname -m) =~ ^i[3456]86$ ]]; then echo i686-linux; else echo x86_64-linux; fi) --exclude tarball --command '
|
|
||||||
configureFlags+=\" \$c --prefix=$(pwd)/inst --sysconfdir=$(pwd)/inst/etc\"
|
|
||||||
return
|
|
||||||
'" \
|
|
||||||
"$@"
|
|
|
@ -22,7 +22,7 @@ $ nix-build release.nix -A build.x86_64-linux
|
||||||
environment variables are set up so that those dependencies can be
|
environment variables are set up so that those dependencies can be
|
||||||
found:
|
found:
|
||||||
<screen>
|
<screen>
|
||||||
$ ./dev-shell
|
$ nix-shell
|
||||||
</screen>
|
</screen>
|
||||||
To build Nix itself in this shell:
|
To build Nix itself in this shell:
|
||||||
<screen>
|
<screen>
|
||||||
|
@ -30,7 +30,7 @@ To build Nix itself in this shell:
|
||||||
[nix-shell]$ configurePhase
|
[nix-shell]$ configurePhase
|
||||||
[nix-shell]$ make
|
[nix-shell]$ make
|
||||||
</screen>
|
</screen>
|
||||||
To test it:
|
To install it in <literal>$(pwd)/nix</literal> and test it:
|
||||||
<screen>
|
<screen>
|
||||||
[nix-shell]$ make install
|
[nix-shell]$ make install
|
||||||
[nix-shell]$ make installcheck
|
[nix-shell]$ make installcheck
|
||||||
|
|
33
shell.nix
Normal file
33
shell.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "nix";
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[ curl bison flex perl libxml2 libxslt bzip2 xz
|
||||||
|
pkgconfig sqlite libsodium boehmgc
|
||||||
|
docbook5 docbook5_xsl
|
||||||
|
autoconf-archive
|
||||||
|
(aws-sdk-cpp.override {
|
||||||
|
apis = ["s3"];
|
||||||
|
customMemoryManagement = false;
|
||||||
|
})
|
||||||
|
autoreconfHook
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags =
|
||||||
|
[ "--disable-init-state"
|
||||||
|
"--enable-gc"
|
||||||
|
"--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
||||||
|
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
installFlags = "sysconfdir=$(out)/etc";
|
||||||
|
|
||||||
|
shellHook =
|
||||||
|
''
|
||||||
|
configureFlags+=" --prefix=$(pwd)/inst"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue