Add proper versioning

This commit is contained in:
Graham Christensen 2017-08-19 10:56:31 -04:00
parent f54a8b7632
commit 6be6381643
No known key found for this signature in database
GPG key ID: 06121D366FE9435C
2 changed files with 13 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {}, revCount, shortRev }:
let
lib = pkgs.lib;
sources = lib.sourceFilesBySuffices ./. [ ".xml" ".txt" ];
@ -7,6 +7,7 @@ let
{
buildInputs = [ pkgs.libxml2 ];
meta.description = "Nix Pills with as a single docbook file";
inherit revCount shortRev;
}
''
cp -r ${sources} ./sources
@ -14,7 +15,7 @@ let
cd sources
printf "%s" "1" > version
printf "%s-%s" "$revCount" "$shortRev" > version
xmllint --xinclude --output $out ./book.xml
'';

View file

@ -1,7 +1,16 @@
{ nix-pills ? { outPath = ./.; revCount = 1234; shortRev = "abcdef"; }
, nixpkgs ? { outPath = <nixpkgs>; revCount = 1234; shortRev = "abcdef"; }
, officialRelease ? false
}:
let
pkgs = import <nixpkgs> { };
in rec {
html-split = import ./default.nix { inherit pkgs; };
html-split = import ./default.nix {
inherit pkgs;
inherit (nix-pills) revCount shortRev;
};
release = pkgs.releaseTools.aggregate
{ name = "nix-pills-release";