aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-04-06 15:44:27 -0600
committerjade <lix@jade.fyi>2024-04-07 22:44:04 +0000
commit3ac2dd061302df1625a41b0f0f979ce2504560f0 (patch)
tree6db594ff8ad926dc8e2ea0f28c84759527af08b3 /flake.nix
parent06e11778b594931b24d256a0a68ccea6533c6b48 (diff)
package: put boehmgc patch logic in package.nix
In our view it really doesn't make sense to not have this in in package.nix in some way. These patches aren't just for performance or something -- Lix flat out doesn't build without these patches. (Arguably that makes them a buildsystem responsibility as well, but that can wait for when we're ready to start adding subproject fallback dependency resolution to Meson.) This is a step towards making `package.nix` more self-sufficient and `callPackage`able without excessive external logic. With this change the following command is enough to build Lix from out of the flake: nix-build -E 'let pkgs = import <nixpkgs> { }; in pkgs.callPackage ./package.nix { build-release-notes = false; inherit (pkgs.lib) fileset; nix-doc = pkgs.callPackage ./nix-doc/package.nix { }; }' Change-Id: Ia37fe8171f87d3293033de8be07d9bab12716f1d
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix17
1 files changed, 4 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix
index 647d15b4a..25d025b1c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -163,16 +163,6 @@
build-release-notes =
final.buildPackages.callPackage ./maintainers/build-release-notes.nix { };
clangbuildanalyzer = final.buildPackages.callPackage ./misc/clangbuildanalyzer.nix { };
- boehmgc-nix = (final.boehmgc.override {
- enableLargeConfig = true;
- }).overrideAttrs (o: {
- patches = (o.patches or [ ]) ++ [
- ./boehmgc-coroutine-sp-fallback.diff
-
- # https://github.com/ivmai/bdwgc/pull/586
- ./boehmgc-traceable_allocator-public.diff
- ];
- });
default-busybox-sandbox-shell = final.busybox.override {
useMusl = true;
@@ -203,10 +193,13 @@
nix = final.callPackage ./package.nix {
inherit versionSuffix fileset;
stdenv = currentStdenv;
- boehmgc = final.boehmgc-nix;
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
nix-doc = final.nix-doc;
};
+
+ # Export the patched version of boehmgc that Lix uses into the overlay
+ # for consumers of this flake.
+ boehmgc-nix = final.nix.boehmgc-nix;
};
in {
@@ -268,7 +261,6 @@
inherit versionSuffix fileset officialRelease buildUnreleasedNotes;
inherit (pkgs) build-release-notes;
internalApiDocs = true;
- boehmgc = pkgs.boehmgc-nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell;
};
in
@@ -406,7 +398,6 @@
let
nix = pkgs.callPackage ./package.nix {
inherit stdenv versionSuffix fileset;
- boehmgc = pkgs.boehmgc-nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox;
forDevShell = true;
};