Add flake.nix

This commit is contained in:
Eelco Dolstra 2019-05-08 13:28:02 +02:00
parent ff64583d07
commit 4172b5b290
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 32 additions and 1 deletions

9
flake.lock Normal file
View file

@ -0,0 +1,9 @@
{
"nonFlakeRequires": {},
"requires": {
"nixpkgs": {
"uri": "github:edolstra/nixpkgs/a4d896e89932e873c4117908d558db6210fa3b56"
}
},
"version": 1
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
{
name = "hydra";
description = "A Nix-based continuous build system";
epoch = 2019;
requires = [ "nixpkgs" ];
provides = deps: rec {
hydraJobs = import ./release.nix {
hydraSrc = deps.self;
nixpkgs = deps.nixpkgs;
};
packages.hydra = hydraJobs.build.x86_64-linux;
defaultPackage = packages.hydra;
};
}

View file

@ -30,7 +30,8 @@ let
environment.systemPackages = [ pkgs.perlPackages.LWP pkgs.perlPackages.JSON ];
};
version = builtins.readFile ./version + "." + toString hydraSrc.revCount + "." + hydraSrc.rev;
# FIXME: use commit date.
version = builtins.readFile ./version + "." + toString hydraSrc.revCount or 0 + "." + hydraSrc.shortRev or "0000000";
in