Add flake.nix for testing

This commit is contained in:
Ehmry - 2020-01-22 13:13:22 +01:00
parent 9f275da812
commit d093a692e7
2 changed files with 47 additions and 35 deletions

View File

@ -1,5 +1,24 @@
{
"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": "dhall-haskell",
"url": "git+https://github.com/dhall-lang/dhall-haskell.git?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"genodepkgs": {
"inputs": {
"dhall-haskell": {
@ -21,38 +40,6 @@
"originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
"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-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-q/N+wl3vrCi+hVNXOLl5IK154RX5aK3l55KKq5u7XCU=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=292bd3f5795d37874e440db11caaa6d15fb1e58b"
},
"genode-depot": {
"inputs": {
"nixpkgs": {
@ -73,9 +60,9 @@
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-pmdAiEyrSZz8b+6Xdd3BkTVJcA8pV+RhY8bRTK/e53I=",
"originalUrl": "genodepkgs",
"url": "git+file:///home/repo/genodepkgs?ref=master&rev=c35838d1021a1e7e5d35018e8a9fac3353e38102"
"narHash": "sha256-Noaw89gCoMJqPN26woPeyZjUcWVlP46Yc7liGqyBLLg=",
"originalUrl": "git+https://git.sr.ht/~ehmry/genodepkgs?ref=staging",
"url": "git+https://git.sr.ht/~ehmry/genodepkgs?ref=staging&rev=c4af5cc61cb83095a93bff49b9e306ff5f44119b"
}
},
"version": 3

25
flake.nix Normal file
View File

@ -0,0 +1,25 @@
{
description = "A Sotest producer for Genode";
edition = 201909;
inputs.genodepkgs.uri = "git+https://git.sr.ht/~ehmry/genodepkgs?ref=staging";
outputs = { self, genodepkgs, dhall-haskell }:
let localSystem = "x86_64-linux";
in {
defaultPackage = with builtins;
let
pkgs = genodepkgs.packages;
systems = attrNames pkgs;
f = system: {
name = system;
value = pkgs.${system}.sotest-producer.overrideAttrs
(attrs: { src = self; });
};
list = map f systems;
in listToAttrs list;
};
}