overlay: extend nimblePackages in overlay

This commit is contained in:
Emery Hemingway 2021-03-15 11:52:57 +01:00
parent 7078c64a1c
commit 4bc0f2ddea
4 changed files with 26 additions and 65 deletions

View File

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

View File

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

View File

@ -172,20 +172,25 @@ in nullPkgs // {
# Stay clear of upstream on this one. # Stay clear of upstream on this one.
addPatchesHost [ ./ncurses/genode.patch ] ncurses; addPatchesHost [ ./ncurses/genode.patch ] ncurses;
nim = nim-unwrapped =
# 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
# Fixes to the compiler and standard libary. # 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 = openssl =
overrideHost { static = true; } # shared library comes out stupid big overrideHost { static = true; } # shared library comes out stupid big

View File

@ -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