From cb8828ec2f95e7640bb16bc24ea784f52d59992f Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 10 Oct 2020 15:08:58 +0200 Subject: [PATCH] Make build reproducible --- default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index b2e5f49..295c24a 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,15 @@ -{ pkgs ? import {} }: - let + pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/afbf62d179bff8b3191316eab9890255b512bf78.tar.gz") {}; + + # reproducible source + gitignoreSrc = pkgs.fetchFromGitHub { + owner = "hercules-ci"; + repo = "gitignore"; + rev = "c4662e662462e7bf3c2a968483478a665d00e717"; + sha256 = "sha256:1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx"; + }; + inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource; + texlive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small biber @@ -21,7 +30,7 @@ pkgs.stdenv.mkDerivation { texlive ]; - src = pkgs.nix-gitignore.gitignoreSource [] ./.; + src = gitignoreSource ./.; # We only build a PDF dontFixup = true;