Use stdenv.mkDerivation instead of runCommand
I'm silly sometimes: https://discourse.nixos.org/t/using-the-src-attribute-in-runcommand/19329
This commit is contained in:
parent
b1bfec14a9
commit
421d930c9a
36
flake.nix
36
flake.nix
|
@ -18,25 +18,31 @@
|
||||||
inherit (pkgs.lib.sources) sourceFilesBySuffices;
|
inherit (pkgs.lib.sources) sourceFilesBySuffices;
|
||||||
in {
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
default =
|
default = pkgs.stdenvNoCC.mkDerivation {
|
||||||
pkgs.runCommand "build-cv" {
|
name = "cv";
|
||||||
OSFONTDIR =
|
src = sourceFilesBySuffices self [".tex"];
|
||||||
concatMapStringsSep ";" (pkg: "${pkg}/share/fonts/truetype/")
|
|
||||||
(with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
roboto
|
texlive.combined.scheme-context
|
||||||
roboto-slab
|
];
|
||||||
roboto-mono
|
|
||||||
]);
|
OSFONTDIR =
|
||||||
buildInputs = with pkgs; [
|
concatMapStringsSep ";" (pkg: "${pkg}/share/fonts/truetype/")
|
||||||
texlive.combined.scheme-context
|
(with pkgs; [
|
||||||
];
|
roboto
|
||||||
input = sourceFilesBySuffices self [".tex"];
|
roboto-slab
|
||||||
} ''
|
roboto-mono
|
||||||
cp ${self}/*.tex .
|
]);
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
context cv
|
context cv
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp cv.pdf $out/cv.pdf
|
cp cv.pdf $out/cv.pdf
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# Legacy nix command support
|
# Legacy nix command support
|
||||||
# TODO(tlater): Remove once 22.05 is adopted
|
# TODO(tlater): Remove once 22.05 is adopted
|
||||||
|
|
Loading…
Reference in a new issue