add frpball

This commit is contained in:
Astro 2019-10-10 23:37:35 +02:00
parent cdeea24bb9
commit 56a0d0b968
2 changed files with 68 additions and 0 deletions

60
frpball.nix Normal file
View File

@ -0,0 +1,60 @@
{ pkgs ? import <nixpkgs> {},
}:
with pkgs;
let
source = stdenv.mkDerivation {
name = "frpball-source";
src = <frpball>;
buildInputs = [ cabal2nix ];
buildPhase = ''
cabal2nix . > package.nix
cat > default.nix << EOF
{ pkgs ? import <nixpkgs> {},
}:
let
# NixOS 19.09 ships gl-0.9 which is excluded from GPipe's
# dependency bounds
gl = with pkgs; with haskellPackages; mkDerivation {
pname = "gl";
version = "0.8.0";
sha256 = "0f8l1ra05asqjnk97sliqb3wqvr6lic18rfs1f9dm1kw2lw2hkda";
revision = "3";
editedCabalFile = "0q8d4237ds78y4p35xl2arlmmpgs2ag7krw9chby6q9dcs00zxrl";
setupHaskellDepends = [
base Cabal containers directory filepath hxt transformers
];
libraryHaskellDepends = [
base containers fixed half transformers
];
librarySystemDepends = [ libGL ];
description = "Complete OpenGL raw bindings";
license = stdenv.lib.licenses.bsd3;
};
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
inherit gl;
};
};
in
haskellPackages.callPackage ./package.nix {}
EOF
'';
installPhase = "cp -ar . $out";
};
ghcVersions =
builtins.filter (p:
p == "ghcHEAD" || builtins.match "ghc[[:digit:]]+" p != null
) (builtins.attrNames pkgs.haskell.packages);
frpball = haskellPackages:
import source {
pkgs = pkgs // { inherit haskellPackages; };
};
in
builtins.listToAttrs
(map (ghcVersion: {
name = "frpball-${ghcVersion}";
value = pkgs.lib.hydraJob (frpball (builtins.getAttr ghcVersion haskell.packages));
}) ghcVersions)

View File

@ -84,6 +84,14 @@ let
ticker = "https://gitea.c3d2.de/astro/ticker.git master 1";
};
};
frpball = mkJobset {
description = "Functional reactive programming ball game";
nixexprpath = "frpball.nix";
gitUrls = {
frpball = "https://github.com/nek0/frpball.git master 1";
};
};
};
jobsetsJson = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets );