Update flake

This commit is contained in:
Ehmry - 2020-01-14 17:13:46 +01:00
parent 224627f792
commit 560196da91
3 changed files with 81 additions and 32 deletions

View File

@ -1,4 +1,4 @@
run git submodule foreach --quiet 'echo ":|> ^ nix-prefetch-git $name^ nix-prefetch-git --quiet --fetch-submodules --url $toplevel/$sm_path --rev $sha1 > %o |> $displaypath.json {prefetch}"'
run git submodule foreach --quiet 'echo ":|> ^ nix-prefetch-git $name^ nix-prefetch-git --quiet --fetch-submodules --url $toplevel/$sm_path --rev $sha1 > %o |> $displaypath.json $(TUP_CWD)/<submodules> {prefetch}"'
# Generate a JSON description for each Git submodule that
# can be used to generate a Nix fixed-output derivation.
@ -7,5 +7,5 @@ run git submodule foreach --quiet 'echo ":|> ^ nix-prefetch-git $name^ nix-prefe
echo 'let readJSON = p: with builtins; fromJSON (readFile p); in [' >> %o; \
git submodule foreach --quiet 'echo "{ name = \"$name\"; value = { smPath = \"$sm_path\"; prefetch = readJSON ./$displaypath.json; url = \"`git remote get-url origin`\"; }; }"' >> %o; \
echo ']' >> %o; \
|> submodules.nix
|> submodules.nix $(TUP_CWD)/<submodules>
# Generate a Nix expression that contains a description of all submodules.

View File

@ -17,52 +17,71 @@
"url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b"
}
},
"narHash": "sha256-NGbS2bymVuCQcanlBO41I6ZjSAZSLXhACK3qQU25zUs=",
"narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=",
"originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=256810cd5adf1ae5862eed0ffdaab4cf49f6fe67"
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"genode": {
"inputs": {
"dhall-haskell": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY=",
"originalUrl": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148",
"url": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148"
},
"nixpkgsStaticLinux": {
"inputs": {},
"narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8=",
"originalUrl": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working",
"url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b"
}
},
"narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=",
"originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-g++A7ut8qyY3yi6WskTHwYbci6+MeTxJDLyzSrTjruM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=9426fc2248cfc706f7a659b04fcd6935515232bc"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-MGVDUZoerXEaDe5far0g+djcnvJRYCW0OcceYvkN8rY=",
"narHash": "sha256-nQ42ujMS0QcOk0xCGzdsjZNQS2z3RuxthIRE8na5YL0=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=94266a7bb01b5486ce511620f1d5198a6b07ea75"
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=8c8606b375fb913864b0e51892da51eccf97df5f"
},
"genode-depot": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-Y5ZOTgInrYYoas3vM8uTPLA2DvFI9YoI6haftIKl9go=",
"narHash": "sha256-NB+H7zK3BB//zM127FqgbG4iAfY+nS/IOyO+uGWA5Ho=",
"originalUrl": "nixpkgs",
"url": "github:edolstra/nixpkgs/015c9ec3372e328ea6742b409a1e9aa26dab2b31"
"url": "github:edolstra/nixpkgs/7845bf5f4b3013df1cf036e9c9c3a55a30331db9"
}
},
"narHash": "sha256-906fpTV5A83O45PWbB4r3doDOLUxcO+8/NW3LH0ysoo=",
"narHash": "sha256-72QPBUP9EaIPGneWDLYIb6Wo5XR/lmijobDlaX8iKHA=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=803b684bf3c6bc3c087890322567ca18478322ea"
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=4e85cc4dd28d868d28815be4c925b1bb64d19939"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-g++A7ut8qyY3yi6WskTHwYbci6+MeTxJDLyzSrTjruM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=9426fc2248cfc706f7a659b04fcd6935515232bc"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-aVnK41/uYBqDxNOZpaIwLICkrBp5qYN0gehqoOCpOcg=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake",
"url": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake&rev=e92ee9b472fbc8238aa7b653eab28f50e46e0f25"
"narHash": "sha256-S897DaBs/ZQiM7pzXR116d1SbjzBT61ca39SSmlyk38=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genodepkgs",
"url": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=master&rev=7388091a3ef5d52f8fb1782b1c99f6b60e8656ee"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-g++A7ut8qyY3yi6WskTHwYbci6+MeTxJDLyzSrTjruM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=9426fc2248cfc706f7a659b04fcd6935515232bc"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"version": 3

View File

@ -4,8 +4,8 @@
edition = 201909;
inputs = {
nixpkgs.uri = "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode";
genodepkgs.url = "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake";
nixpkgs.uri = "github:ehmry/nixpkgs";
genodepkgs.url = "git+https://gitea.c3d2.de/ehmry/genodepkgs";
};
outputs = { self, nixpkgs, genodepkgs }:
@ -28,7 +28,6 @@
in { smPath, prefetch, url }:
let
value = nixpkgs'.stdenv.mkDerivation {
pname = name;
version = "unstable";
@ -66,23 +65,54 @@
'';
dontInstall = true;
};
in { inherit name value; };
expandPackagesList = system:
expandPackagesList = { system, localSystem, crossSystem }:
map (sm: expandSubmodule system sm.name sm.value) submoduleList;
expandPackages = system: builtins.listToAttrs (expandPackagesList system);
systems = [ "x86_64-genode" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
packages = forAllSystems expandPackages;
defaultPackage =
forAllSystems (system: self.packages."${system}".retro_frontend);
packages = nixpkgs.lib.forAllCrossSystems expandPackages;
defaultPackage.x86_64-linux =
self.packages.x86_64-linux-x86_64-genode.retro_frontend;
hydraJobs = self.packages;
/* checks = nixpkgs.lib.forAllCrossSystems ({ system, localSystem, crossSystem }:
let
packages = (builtins.getAttr system genodepkgs.packages)
// (builtins.getAttr system self.packages);
depot = builtins.getAttr system genode-depot.packages;
lib = nixpkgs.lib // genodepkgs.lib;
in import ./checks { inherit system packages depot lib; });
testNova = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
let
thisSystem = builtins.getAttr system;
packages = (thisSystem genodepkgs.packages)
// (thisSystem self.packages);
depot = thisSystem genode-depot.packages;
lib = nixpkgs.lib // genodepkgs.lib;
systemLib = thisSystem lib;
in rom@{ ... }:
systemLib.buildNovaIso {
name = "libretro-test-nova";
rom = {
config = systemLib.renderDhallInit ./checks/test.dhall "{=}";
"libc.lib.so" = "${depot.libc}/lib/libc.lib.so";
"libm.lib.so" = "${depot.libc}/lib/libm.lib.so";
"vfs.lib.so" = "${packages.os}/lib/vfs.lib.so";
retro_frontend = packages.retro_frontend
+ "/bin/retro_frontend/retro_frontend";
} // rom;
});
*/
};
}