lixVersions.lix_2_91: init (#334269)
This adds Lix 2.91.0 to nixpkgs and sets it as the default Lix release. Blog post: https://lix.systems/blog/2024-08-12-lix-2.91-release/ Release notes: https://docs.lix.systems/manual/lix/stable/release-notes/rl-2.91.html Change-Id: I6960314bddceb7ab10e3cd6d9842d578f501fd76 Co-authored-by: Atemu <git@atemu.net> Co-authored-by: Yureka <yureka@cyberchaos.dev> Co-authored-by: getchoo <48872998+getchoo@users.noreply.github.com>
This commit is contained in:
co-authored by
Atemu
Yureka
getchoo
parent
b08dad9f35
commit
5b6d2fb626
@@ -19,7 +19,6 @@ assert (hash == null) -> (src != null);
|
||||
{
|
||||
stdenv,
|
||||
meson,
|
||||
bash,
|
||||
bison,
|
||||
boehmgc,
|
||||
boost,
|
||||
@@ -27,29 +26,20 @@ assert (hash == null) -> (src != null);
|
||||
busybox-sandbox-shell,
|
||||
bzip2,
|
||||
callPackage,
|
||||
coreutils,
|
||||
curl,
|
||||
cmake,
|
||||
docbook_xsl_ns,
|
||||
docbook5,
|
||||
doxygen,
|
||||
editline,
|
||||
flex,
|
||||
git,
|
||||
gnutar,
|
||||
gtest,
|
||||
gzip,
|
||||
jq,
|
||||
lib,
|
||||
libarchive,
|
||||
libcpuid,
|
||||
libgit2,
|
||||
libsodium,
|
||||
libxml2,
|
||||
libxslt,
|
||||
lowdown,
|
||||
lsof,
|
||||
man,
|
||||
mercurial,
|
||||
mdbook,
|
||||
mdbook-linkcheck,
|
||||
@@ -57,8 +47,8 @@ assert (hash == null) -> (src != null);
|
||||
ninja,
|
||||
openssl,
|
||||
toml11,
|
||||
pegtl,
|
||||
python3,
|
||||
perl,
|
||||
pkg-config,
|
||||
rapidcheck,
|
||||
Security,
|
||||
@@ -85,7 +75,11 @@ assert (hash == null) -> (src != null);
|
||||
stateDir,
|
||||
storeDir,
|
||||
}:
|
||||
assert lib.assertMsg (docCargoHash != null || docCargoLock != null) "Either `lix-doc`'s cargoHash using `docCargoHash` or `lix-doc`'s `cargoLock.lockFile` using `docCargoLock` must be set!";
|
||||
assert lib.assertMsg (docCargoHash != null || docCargoLock != null)
|
||||
"Either `lix-doc`'s cargoHash using `docCargoHash` or `lix-doc`'s `cargoLock.lockFile` using `docCargoLock` must be set!";
|
||||
let
|
||||
isLegacyParser = lib.versionOlder version "2.91";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "lix";
|
||||
|
||||
@@ -102,6 +96,7 @@ stdenv.mkDerivation {
|
||||
++ lib.optionals enableDocumentation [
|
||||
"man"
|
||||
"doc"
|
||||
"devdoc"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
@@ -109,14 +104,12 @@ stdenv.mkDerivation {
|
||||
nativeBuildInputs =
|
||||
[
|
||||
pkg-config
|
||||
bison
|
||||
flex
|
||||
jq
|
||||
meson
|
||||
ninja
|
||||
cmake
|
||||
python3
|
||||
doxygen
|
||||
|
||||
# Tests
|
||||
git
|
||||
@@ -124,10 +117,12 @@ stdenv.mkDerivation {
|
||||
jq
|
||||
lsof
|
||||
]
|
||||
++ lib.optionals (enableDocumentation) [
|
||||
++ lib.optionals isLegacyParser [ bison ]
|
||||
++ lib.optionals enableDocumentation [
|
||||
(lib.getBin lowdown)
|
||||
mdbook
|
||||
mdbook-linkcheck
|
||||
doxygen
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [ util-linuxMinimal ];
|
||||
|
||||
@@ -149,6 +144,7 @@ stdenv.mkDerivation {
|
||||
toml11
|
||||
lix-doc
|
||||
]
|
||||
++ lib.optionals (!isLegacyParser) [ pegtl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security ]
|
||||
++ lib.optionals (stdenv.isx86_64) [ libcpuid ]
|
||||
++ lib.optionals withLibseccomp [ libseccomp ]
|
||||
@@ -160,7 +156,7 @@ stdenv.mkDerivation {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build tests
|
||||
patchShebangs --build tests doc/manual
|
||||
'';
|
||||
|
||||
preConfigure =
|
||||
@@ -184,13 +180,20 @@ stdenv.mkDerivation {
|
||||
''}
|
||||
'';
|
||||
|
||||
mesonBuildType = "release";
|
||||
# -O3 seems to anger a gcc bug and provide no performance benefit.
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114360
|
||||
# We use -O2 upstream https://gerrit.lix.systems/c/lix/+/554
|
||||
mesonBuildType = "debugoptimized";
|
||||
|
||||
mesonFlags =
|
||||
[
|
||||
# LTO optimization
|
||||
# Enable LTO, since it improves eval performance a fair amount
|
||||
# LTO is disabled on static due to strange linking errors
|
||||
(lib.mesonBool "b_lto" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.mesonEnable "gc" true)
|
||||
(lib.mesonBool "enable-tests" true)
|
||||
(lib.mesonBool "enable-docs" enableDocumentation)
|
||||
(lib.mesonEnable "internal-api-docs" enableDocumentation)
|
||||
(lib.mesonBool "enable-embedded-sandbox-shell" (stdenv.isLinux && stdenv.hostPlatform.isStatic))
|
||||
(lib.mesonEnable "seccomp-sandboxing" withLibseccomp)
|
||||
|
||||
@@ -202,10 +205,15 @@ stdenv.mkDerivation {
|
||||
(lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox")
|
||||
];
|
||||
|
||||
ninjaFlags = [ "-v" ];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
lib.optionalString enableDocumentation ''
|
||||
mkdir -p $doc/nix-support
|
||||
echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products
|
||||
|
||||
mkdir -p $devdoc/nix-support
|
||||
echo "devdoc internal-api $devdoc/share/doc/nix/internal-api" >> $devdoc/nix-support/hydra-build-products
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isStatic ''
|
||||
mkdir -p $out/nix-support
|
||||
@@ -220,15 +228,27 @@ stdenv.mkDerivation {
|
||||
done
|
||||
'';
|
||||
|
||||
# This needs to run after _multioutDocs moves the docs to $doc
|
||||
postFixup = lib.optionalString enableDocumentation ''
|
||||
mkdir -p $devdoc/share/doc/nix
|
||||
mv $doc/share/doc/nix/internal-api $devdoc/share/doc/nix
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
mesonCheckFlags = [ "--suite=check" ];
|
||||
mesonCheckFlags = [
|
||||
"--suite=check"
|
||||
"--print-errorlogs"
|
||||
];
|
||||
checkInputs = [
|
||||
gtest
|
||||
rapidcheck
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
mesonInstallCheckFlags = [ "--suite=installcheck" ];
|
||||
mesonInstallCheckFlags = [
|
||||
"--suite=installcheck"
|
||||
"--print-errorlogs"
|
||||
];
|
||||
|
||||
preInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# socket path becomes too long otherwise
|
||||
@@ -248,12 +268,17 @@ stdenv.mkDerivation {
|
||||
"shadowstack"
|
||||
# strictoverflow is disabled because we trap on signed overflow instead
|
||||
"strictoverflow"
|
||||
] ++ lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||
]
|
||||
# fortify breaks the build with lto and musl for some reason
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "fortify";
|
||||
|
||||
# hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ];
|
||||
# hardeningDisable = lib.optional stdenv.hostPlatform.isMusl "fortify";
|
||||
separateDebugInfo = stdenv.isLinux && !enableStatic;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Used by (1) test which has dynamic port assignment.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
passthru = {
|
||||
inherit aws-sdk-cpp boehmgc;
|
||||
tests = {
|
||||
@@ -264,7 +289,7 @@ stdenv.mkDerivation {
|
||||
# point 'nix edit' and ofborg at the file that defines the attribute,
|
||||
# not this common file.
|
||||
pos = builtins.unsafeGetAttrPos "version" args;
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
||||
longDescription = ''
|
||||
Lix (a fork of Nix) is a powerful package manager for Linux and other Unix systems that
|
||||
@@ -274,11 +299,10 @@ stdenv.mkDerivation {
|
||||
environments.
|
||||
'';
|
||||
homepage = "https://lix.systems";
|
||||
license = licenses.lgpl21Plus;
|
||||
license = lib.licenses.lgpl21Plus;
|
||||
inherit maintainers;
|
||||
platforms = platforms.unix;
|
||||
outputsToInstall = [ "out" ] ++ optional enableDocumentation "man";
|
||||
platforms = lib.platforms.unix;
|
||||
outputsToInstall = [ "out" ] ++ lib.optional enableDocumentation "man";
|
||||
mainProgram = "nix";
|
||||
broken = enableStatic;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
boehmgc,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
Security,
|
||||
|
||||
storeDir ? "/nix/store",
|
||||
@@ -33,6 +34,9 @@ let
|
||||
requiredSystemFeatures = [ ];
|
||||
};
|
||||
|
||||
# Since Lix 2.91 does not use boost coroutines, it does not need boehmgc patches either.
|
||||
needsBoehmgcPatches = version: lib.versionOlder version "2.91";
|
||||
|
||||
common =
|
||||
args:
|
||||
callPackage (import ./common.nix ({ inherit lib fetchFromGitHub; } // args)) {
|
||||
@@ -42,11 +46,11 @@ let
|
||||
stateDir
|
||||
confDir
|
||||
;
|
||||
boehmgc = boehmgc-nix;
|
||||
boehmgc = if needsBoehmgcPatches args.version then boehmgc-nix else boehmgc-nix_2_3;
|
||||
aws-sdk-cpp = aws-sdk-cpp-nix;
|
||||
};
|
||||
in
|
||||
lib.makeExtensible (self: ({
|
||||
lib.makeExtensible (self: {
|
||||
buildLix = common;
|
||||
|
||||
lix_2_90 = (
|
||||
@@ -57,6 +61,31 @@ lib.makeExtensible (self: ({
|
||||
}
|
||||
);
|
||||
|
||||
latest = self.lix_2_90;
|
||||
stable = self.lix_2_90;
|
||||
}))
|
||||
lix_2_91 = (
|
||||
common {
|
||||
version = "2.91.0";
|
||||
hash = "sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s=";
|
||||
docCargoHash = "sha256-KOn1fXF7k7c/0e5ZCNZwt3YZmjL1oi5A2mhwxQWKaUo=";
|
||||
|
||||
patches = [
|
||||
# Fix meson to not use target_machine, fixing cross. This commit is in release-2.91: remove when updating to 2.91.1 (if any).
|
||||
# https://gerrit.lix.systems/c/lix/+/1781
|
||||
# https://git.lix.systems/lix-project/lix/commit/ca2b514e20de12b75088b06b8e0e316482516401
|
||||
(fetchpatch {
|
||||
url = "https://git.lix.systems/lix-project/lix/commit/ca2b514e20de12b75088b06b8e0e316482516401.patch";
|
||||
hash = "sha256-TZauU4RIsn07xv9vZ33amrDvCLMbrtcHs1ozOTLgu98=";
|
||||
})
|
||||
# Fix musl builds. This commit is in release-2.91: remove when updating to 2.91.1 (if any).
|
||||
# https://gerrit.lix.systems/c/lix/+/1823
|
||||
# https://git.lix.systems/lix-project/lix/commit/ed51a172c69996fc6f3b7dfaa86015bff50c8ba8
|
||||
(fetchpatch {
|
||||
url = "https://git.lix.systems/lix-project/lix/commit/ed51a172c69996fc6f3b7dfaa86015bff50c8ba8.patch";
|
||||
hash = "sha256-X59N+tOQ2GN17p9sXvo9OiuEexzB23ieuOvtq2sre5c=";
|
||||
})
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
latest = self.lix_2_91;
|
||||
stable = self.lix_2_91;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user