Add flake.nix
This commit is contained in:
parent
ff64583d07
commit
4172b5b290
9
flake.lock
Normal file
9
flake.lock
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"nonFlakeRequires": {},
|
||||
"requires": {
|
||||
"nixpkgs": {
|
||||
"uri": "github:edolstra/nixpkgs/a4d896e89932e873c4117908d558db6210fa3b56"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
21
flake.nix
Normal file
21
flake.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue