From 2b800c4b3ace051adce8b1fcf3938c4f83e77990 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sat, 3 Sep 2016 14:22:04 +0200 Subject: [PATCH] shell.nix: patch nixpkgs to add a tex pkg --- shell.nix | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 21373fd..0123e65 100644 --- a/shell.nix +++ b/shell.nix @@ -1,12 +1,36 @@ let - pkgs = import ((import {}).pkgs.fetchFromGitHub { + nixpkgs = import {}; + pkgsSrc = nixpkgs.pkgs.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs-channels"; rev = "6715afca34f7ece882b82c2250a4f6dade42eac5"; # vimtex update sha256 = "1ix8k5sm01i75wxnfrlwbmc8xs8dn5zna7jb4v387h8zy8a74d8m"; - }) {}; -in pkgs.stdenv.mkDerivation { + }; + pkgs = import (nixpkgs.stdenv.mkDerivation { + name = "patchedPackages"; + src = pkgsSrc; + patches = [ + (nixpkgs.fetchurl { + url="https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/15829.patch"; + sha256 = "0a41nspiqs5i32pfzxqm8dp8qhfaajrw622lmlcvlvgbhpkac5r1"; + }) + ]; + + installPhase = '' + mkdir -p $out + cp -a * $out + ''; + + phases = '' + unpackPhase + patchPhase + installPhase + ''; + + }) {}; + +in pkgs.stdenv.mkDerivation { name = "msc-thesis"; buildInputs = [ pkgs.pandoc