forked from lix-project/lix
package.nix: final cleanup
Change-Id: I7d5b7d26a63f7ac56ed054e7f264f39d30273b94
This commit is contained in:
parent
1070ddf84f
commit
c1cb44d5e0
53
package.nix
53
package.nix
|
@ -2,7 +2,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
buildPackages,
|
|
||||||
autoconf-archive,
|
autoconf-archive,
|
||||||
autoreconfHook,
|
autoreconfHook,
|
||||||
aws-sdk-cpp,
|
aws-sdk-cpp,
|
||||||
|
@ -32,10 +31,11 @@
|
||||||
pkg-config,
|
pkg-config,
|
||||||
rapidcheck,
|
rapidcheck,
|
||||||
sqlite,
|
sqlite,
|
||||||
util-linuxMinimal,
|
util-linuxMinimal ? utillinuxMinimal,
|
||||||
|
utillinuxMinimal ? null,
|
||||||
xz,
|
xz,
|
||||||
|
|
||||||
busybox-sandbox-shell ? null,
|
busybox-sandbox-shell,
|
||||||
|
|
||||||
pname ? "nix",
|
pname ? "nix",
|
||||||
versionSuffix ? "",
|
versionSuffix ? "",
|
||||||
|
@ -56,33 +56,6 @@
|
||||||
# .gitignore has already been processed, so any changes in it are irrelevant
|
# .gitignore has already been processed, so any changes in it are irrelevant
|
||||||
# at this point. It is not represented verbatim for test purposes because
|
# at this point. It is not represented verbatim for test purposes because
|
||||||
# that would interfere with repo semantics.
|
# that would interfere with repo semantics.
|
||||||
baseFiles = fileset.fileFilter (f: f.name != ".gitignore") ./.;
|
|
||||||
src = fileset.toSource {
|
|
||||||
root = ./.;
|
|
||||||
fileset = fileset.intersection baseFiles (fileset.unions [
|
|
||||||
./.version
|
|
||||||
./boehmgc-coroutine-sp-fallback.diff
|
|
||||||
./configure.ac
|
|
||||||
./doc
|
|
||||||
./local.mk
|
|
||||||
./m4
|
|
||||||
./Makefile
|
|
||||||
./Makefile.config.in
|
|
||||||
./misc
|
|
||||||
./mk
|
|
||||||
./precompiled-headers.h
|
|
||||||
./src
|
|
||||||
./tests/functional
|
|
||||||
./tests/unit
|
|
||||||
./unit-test-data
|
|
||||||
./COPYING
|
|
||||||
./scripts/local.mk
|
|
||||||
(fileset.fileFilter (f: lib.strings.hasPrefix "nix-profile" f.name) ./scripts)
|
|
||||||
# TODO: do we really need README.md? It doesn't seem used in the build.
|
|
||||||
./README.md
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
aws-sdk-cpp-nix = aws-sdk-cpp.override {
|
aws-sdk-cpp-nix = aws-sdk-cpp.override {
|
||||||
apis = [ "s3" "transfer" ];
|
apis = [ "s3" "transfer" ];
|
||||||
customMemoryManagement = false;
|
customMemoryManagement = false;
|
||||||
|
@ -92,6 +65,8 @@
|
||||||
"RAPIDCHECK_HEADERS=${lib.getDev rapidcheck}/extras/gtest/include"
|
"RAPIDCHECK_HEADERS=${lib.getDev rapidcheck}/extras/gtest/include"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
baseFiles = fileset.fileFilter (f: f.name != ".gitignore") ./.;
|
||||||
|
|
||||||
configureFiles = fileset.unions [
|
configureFiles = fileset.unions [
|
||||||
./.version
|
./.version
|
||||||
./configure.ac
|
./configure.ac
|
||||||
|
@ -139,6 +114,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
outputs = [ "out" ]
|
outputs = [ "out" ]
|
||||||
++ lib.optionals finalAttrs.doBuild [ "dev" "doc" ];
|
++ lib.optionals finalAttrs.doBuild [ "dev" "doc" ];
|
||||||
|
|
||||||
|
# dontBuild isn't specified most of the time, where it is implicitly false.
|
||||||
doBuild = !(finalAttrs.dontBuild or false);
|
doBuild = !(finalAttrs.dontBuild or false);
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -156,10 +132,8 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
git
|
git
|
||||||
mercurial
|
mercurial
|
||||||
jq
|
jq
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
] ++ lib.optional stdenv.hostPlatform.isLinux util-linuxMinimal
|
||||||
# FIXME(Qyriad): should this be util-linux as it is in current upstream?
|
++ lib.optional (!officialRelease && buildUnreleasedNotes) changelog-d;
|
||||||
(buildPackages.util-linuxMinimal or buildPackages.utillinuxMinimal)
|
|
||||||
] ++ lib.optional (!officialRelease && buildUnreleasedNotes) changelog-d;
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
curl
|
curl
|
||||||
|
@ -177,20 +151,14 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
++ lib.optionals stdenv.isLinux [ libseccomp ]
|
++ lib.optionals stdenv.isLinux [ libseccomp ]
|
||||||
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
||||||
# There have been issues building these dependencies
|
# There have been issues building these dependencies
|
||||||
# TODO(Qyriad): Should this also have && (stdenv.isLinux || stdenv.isDarwin), as upstream does?
|
|
||||||
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) aws-sdk-cpp-nix
|
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) aws-sdk-cpp-nix
|
||||||
# FIXME(Qyriad): This is how the flake.nix version does it, but this is cursed.
|
|
||||||
++ lib.optionals (finalAttrs.doCheck) finalAttrs.passthru._checkInputs
|
|
||||||
;
|
;
|
||||||
|
|
||||||
passthru._checkInputs = [
|
checkInputs = [
|
||||||
gtest
|
gtest
|
||||||
rapidcheck
|
rapidcheck
|
||||||
];
|
];
|
||||||
|
|
||||||
# FIXME(Qyriad): remove at the end of refactoring.
|
|
||||||
checkInputs = finalAttrs.passthru._checkInputs;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
boehmgc
|
boehmgc
|
||||||
nlohmann_json
|
nlohmann_json
|
||||||
|
@ -271,9 +239,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
meta.platforms = lib.platforms.unix;
|
meta.platforms = lib.platforms.unix;
|
||||||
|
|
||||||
# FIXME: Used to make checkInputs accessible from outside the derivation args
|
|
||||||
# during the refactor.
|
|
||||||
passthru.finalAttrs = finalAttrs;
|
|
||||||
passthru.perl-bindings = pkgs.callPackage ./perl {
|
passthru.perl-bindings = pkgs.callPackage ./perl {
|
||||||
inherit fileset stdenv;
|
inherit fileset stdenv;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue