Skip to content

Commit

Permalink
Add flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed May 8, 2019
1 parent ff64583 commit 4172b5b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions flake.nix
@@ -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;
};
}
3 changes: 2 additions & 1 deletion release.nix
Expand Up @@ -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

Expand Down

0 comments on commit 4172b5b

Please sign in to comment.