Skip to content

Commit 31287df

Browse files
committed
Bump nixpkgs.
1 parent 9f555d3 commit 31287df

File tree

4 files changed

+103
-6
lines changed

4 files changed

+103
-6
lines changed

default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
let
2424
config = {
2525
packageOverrides = pkgs: rec {
26+
# Very ugly hack to use an older version of elfutils, as the
27+
# newest apparently does not work with static linking.
28+
elfutils191 = pkgs.callPackage ./nix/elfutils191.nix {};
29+
2630
haskellPackages = pkgs.haskellPackages.override {
2731
overrides = haskellPackagesNew: haskellPackagesOld: rec {
2832
futhark-data =
@@ -59,7 +63,7 @@ let
5963
pkgs.haskell.lib.overrideCabal
6064
(pkgs.haskell.lib.addBuildTools
6165
(haskellPackagesOld.callCabal2nix "futhark" (cleanSource ./.) { })
62-
[ pkgs.python39Packages.sphinx ])
66+
[ pkgs.python312Packages.sphinx ])
6367
( _drv: {
6468
isLibrary = false;
6569
isExecutable = true;
@@ -87,7 +91,7 @@ let
8791
"--extra-lib-dirs=${(pkgs.xz.override { enableStatic = true; }).out}/lib"
8892
"--extra-lib-dirs=${(pkgs.zstd.override { enableStatic = true; }).out}/lib"
8993
"--extra-lib-dirs=${(pkgs.bzip2.override { enableStatic = true; }).out}/lib"
90-
"--extra-lib-dirs=${(pkgs.elfutils.overrideAttrs (old: { dontDisableStatic= true; })).out}/lib"
94+
"--extra-lib-dirs=${(elfutils191.overrideAttrs (old: { dontDisableStatic= true; })).out}/lib"
9195
];
9296

9397
preBuild = ''

nix/elfutils191.nix

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, musl-fts
2+
, musl-obstack, m4, zlib, zstd, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs
3+
, argp-standalone
4+
, enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform libarchive, sqlite, curl, libmicrohttpd, libarchive
5+
, gitUpdater, autoreconfHook
6+
}:
7+
8+
# TODO: Look at the hardcoded paths to kernel, modules etc.
9+
stdenv.mkDerivation rec {
10+
pname = "elfutils";
11+
version = "0.191";
12+
13+
src = fetchurl {
14+
url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2";
15+
hash = "sha256-33bbcTZtHXCDZfx6bGDKSDmPFDZ+sriVTvyIlxR62HE=";
16+
};
17+
18+
postPatch = ''
19+
patchShebangs tests/*.sh
20+
'' + lib.optionalString stdenv.hostPlatform.isRiscV ''
21+
# disable failing test:
22+
#
23+
# > dwfl_thread_getframes: No DWARF information found
24+
sed -i s/run-backtrace-dwarf.sh//g tests/Makefile.in
25+
'';
26+
27+
outputs = [ "bin" "dev" "out" "man" ];
28+
29+
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
30+
# as the host-bzip2 will be in the path.
31+
nativeBuildInputs = [ m4 bison flex gettext bzip2 ]
32+
++ lib.optional enableDebuginfod pkg-config
33+
++ lib.optional (stdenv.targetPlatform.useLLVM or false) autoreconfHook;
34+
buildInputs = [ zlib zstd bzip2 xz ]
35+
++ lib.optionals stdenv.hostPlatform.isMusl [
36+
argp-standalone
37+
musl-fts
38+
musl-obstack
39+
] ++ lib.optionals enableDebuginfod [
40+
sqlite
41+
curl
42+
libmicrohttpd
43+
libarchive
44+
];
45+
46+
propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
47+
48+
configureFlags = [
49+
"--program-prefix=eu-" # prevent collisions with binutils
50+
"--enable-deterministic-archives"
51+
(lib.enableFeature enableDebuginfod "libdebuginfod")
52+
(lib.enableFeature enableDebuginfod "debuginfod")
53+
54+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
55+
# Versioned symbols are nice to have, but we can do without.
56+
(lib.enableFeature (!stdenv.hostPlatform.isMicroBlaze) "symbol-versioning")
57+
] ++ lib.optional (stdenv.targetPlatform.useLLVM or false) "--disable-demangler"
58+
++ lib.optionals stdenv.cc.isClang [
59+
"CFLAGS=-Wno-unused-private-field"
60+
"CXXFLAGS=-Wno-unused-private-field"
61+
];
62+
63+
enableParallelBuilding = true;
64+
65+
66+
doCheck =
67+
# Backtrace unwinding tests rely on glibc-internal symbol names.
68+
# Musl provides slightly different forms and fails.
69+
# Let's disable tests there until musl support is fully upstreamed.
70+
!stdenv.hostPlatform.isMusl
71+
# Test suite tries using `uname` to determine whether certain tests
72+
# can be executed, so we need to match build and host platform exactly.
73+
&& (stdenv.hostPlatform == stdenv.buildPlatform);
74+
doInstallCheck = !stdenv.hostPlatform.isMusl
75+
&& (stdenv.hostPlatform == stdenv.buildPlatform);
76+
77+
passthru.updateScript = gitUpdater {
78+
url = "https://sourceware.org/git/elfutils.git";
79+
rev-prefix = "elfutils-";
80+
};
81+
82+
meta = with lib; {
83+
homepage = "https://sourceware.org/elfutils/";
84+
description = "Set of utilities to handle ELF objects";
85+
platforms = platforms.linux;
86+
# https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html
87+
badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
88+
# licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
89+
# but since this package isn't split that way, all three are listed.
90+
license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ];
91+
maintainers = with maintainers; [ r-burns ];
92+
};
93+
}

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"homepage": "",
1818
"owner": "NixOS",
1919
"repo": "nixpkgs",
20-
"rev": "0f1874526206d8a2d6f0a3925618cc45ac83049f",
21-
"sha256": "0fab3015jdy6dsrjcsa8ipsl4pr7cizg8bs3ff2dawxfgrgizyqp",
20+
"rev": "cf0e7c1ab2634e89fc2c4ec479609b8250dc0ace",
21+
"sha256": "14g5j556bkckplprzb907d06mkxzxs45dzkglacz1jrx955xx86w",
2222
"type": "tarball",
23-
"url": "https://github.com/NixOS/nixpkgs/archive/0f1874526206d8a2d6f0a3925618cc45ac83049f.tar.gz",
23+
"url": "https://github.com/NixOS/nixpkgs/archive/cf0e7c1ab2634e89fc2c4ec479609b8250dc0ace.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
}
2626
}

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let
33
sources = import ./nix/sources.nix;
44
pkgs = import sources.nixpkgs {};
5-
python = pkgs.python311Packages;
5+
python = pkgs.python312Packages;
66
haskell = pkgs.haskell.packages.ghc96;
77
in
88
pkgs.stdenv.mkDerivation {

0 commit comments

Comments
 (0)