forked from lix-project/lix
1969f357b7
E.g. $ nix eval '(fetchMercurial https://www.mercurial-scm.org/repo/hello)' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "82e55d328c8ca4ee16520036c0aaace03a5beb65"; revCount = 1; shortRev = "82e55d328c8c"; } $ nix eval '(fetchMercurial { url = https://www.mercurial-scm.org/repo/hello; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; })' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; revCount = 0; shortRev = "0a04b987be5a"; } $ nix eval '(fetchMercurial /tmp/unclean-hg-tree)' { branch = "default"; outPath = "/nix/store/cm750cdw1x8wfpm3jq7mz09r30l9r024-source"; rev = "0000000000000000000000000000000000000000"; revCount = 0; shortRev = "000000000000"; }
46 lines
935 B
Nix
46 lines
935 B
Nix
{ useClang ? false }:
|
|
|
|
with import <nixpkgs> {};
|
|
|
|
with import ./release-common.nix { inherit pkgs; };
|
|
|
|
(if useClang then clangStdenv else stdenv).mkDerivation {
|
|
name = "nix";
|
|
|
|
buildInputs =
|
|
[ curl bison flex libxml2 libxslt
|
|
bzip2 xz brotli
|
|
pkgconfig sqlite libsodium boehmgc
|
|
docbook5 docbook5_xsl
|
|
autoconf-archive
|
|
(aws-sdk-cpp.override {
|
|
apis = ["s3"];
|
|
customMemoryManagement = false;
|
|
})
|
|
autoreconfHook
|
|
nlohmann_json
|
|
|
|
# For nix-perl
|
|
perl
|
|
perlPackages.DBDSQLite
|
|
|
|
# Tests
|
|
mercurial
|
|
]
|
|
++ lib.optional stdenv.isLinux libseccomp;
|
|
|
|
inherit configureFlags;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installFlags = "sysconfdir=$(out)/etc";
|
|
|
|
shellHook =
|
|
''
|
|
export prefix=$(pwd)/inst
|
|
configureFlags+=" --prefix=$prefix"
|
|
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
PATH=$prefix/bin:$PATH
|
|
'';
|
|
}
|