overlay: extend nimblePackages in overlay

post-mortem
Emery Hemingway 2 years ago
parent 7078c64a1c
commit 4bc0f2ddea
  1. 12
      flake.lock
  2. 4
      flake.nix
  3. 31
      overlay/default.nix
  4. 44
      overlay/tup/setup-hook.sh

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1614366386,
"narHash": "sha256-zs91mU2gQUzvcShKckdWfBIV3eTVmjZRZn3j+z8p7eE=",
"lastModified": 1615634419,
"narHash": "sha256-VSPhQ2wvwrPbnfxPGsXQe3lTEsTOk9mUjfD/WVDPskM=",
"owner": "nix-community",
"repo": "flake-nimble",
"rev": "5f7ef9476c394985fee98b71631641970d7ffb07",
"rev": "79d42ec0ba0349a967b38db70ae2e3e2f6d9c3e2",
"type": "github"
},
"original": {
@ -33,11 +33,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1613672748,
"narHash": "sha256-8f/GGmO8zWSQj2lVjoDyQDURk6Nx9lY0VC7MwkE/Y8U=",
"lastModified": 1615205753,
"narHash": "sha256-XIYZwHzrTgRkwQ8Dl+yoFbkOHxPinWlp11X8m4IOxHQ=",
"owner": "ehmry",
"repo": "nixpkgs",
"rev": "5a18ecda0f9f79e7d1de49512ae74c01ddbb4909",
"rev": "c5de11a19e5c30fce1b1abf5e3e71489e2666f5e",
"type": "github"
},
"original": {

@ -168,7 +168,7 @@
if localSystem == crossSystem then
f {
inherit system;
overlays = [ self.overlay nimble.overlay ];
overlays = [ self.overlay ];
}
else
f {
@ -178,7 +178,7 @@
useLLVM = true;
};
config.allowUnsupportedSystem = true;
overlays = [ self.overlay nimble.overlay ];
overlays = [ self.overlay ];
});
packages =

@ -172,20 +172,25 @@ in nullPkgs // {
# Stay clear of upstream on this one.
addPatchesHost [ ./ncurses/genode.patch ] ncurses;
nim =
# Nim is configured to build Genode with GCC.
overrideAttrsTarget (attrs: {
postInstall = ''
sed \
-e '/cc = gcc/d' \
-i $out/etc/nim/nim.cfg
'';
}) prev.nim;
nim-unwrapped = addPatchesTarget [
./nim/genode.patch
nim-unwrapped =
# Fixes to the compiler and standard libary.
] prev.nim-unwrapped;
prev.nim-unwrapped.overrideAttrs
(attrs: { patches = attrs.patches ++ [ ./nim/genode.patch ]; });
nimblePackages =
# Packages from the Nimble flake with adjustments.
let pkgs' = flake.inputs.nimble.overlay (final // pkgs') final;
in pkgs'.nimblePackages.extend (final: prev: {
genode = prev.genode.overrideAttrs (attrs: {
src = fetchgit {
inherit (attrs.src) url;
rev = "27ab40d6cb8870ae306be5d09b7513db14bf4343";
sha256 = "1hzvyk6djnb65sl2x0sxc57vwaghvzyynp0pxvmnfbj08vp99v0m";
};
});
});
openssl =
overrideHost { static = true; } # shared library comes out stupid big

@ -1,44 +0,0 @@
#!/bin/sh
tupConfigurePhase() {
runHook preConfigure
echo -n CONFIG_TUP_ARCH= >> tup.config
case "$system" in
"i686-*") echo i386 >> tup.config;;
"x86_64-*") echo x86_64 >> tup.config;;
"powerpc-*") echo powerpc >> tup.config;;
"powerpc64-*") echo powerpc64 >> tup.config;;
"ia64-*") echo ia64 >> tup.config;;
"alpha-*") echo alpha >> tup.config;;
"sparc-*") echo sparc >> tup.config;;
"aarch64-*") echo arm64 >> tup.config;;
"arm*") echo arm >> tup.config;;
esac
echo "${tupConfig-}" >> tup.config
tup init
tup generate tupBuild.sh
runHook postConfigure
}
if [ -z "${dontUseTupConfigure-}" -a -z "${configurePhase-}" ]; then
configurePhase=tupConfigurePhase
fi
tupBuildPhase() {
runHook preBuild
pushd .
. tupBuild.sh
popd
runHook postBuild
}
if [ -z "${dontUseTupBuild-}" -a -z "${buildPhase-}" ]; then
buildPhase=tupBuildPhase
fi
Loading…
Cancel
Save