> What you wrote is true, but it also seems to me unlikely that the OP is going to set up a sandboxed hermetic build to process a handful of pngs for her zine.
But it's trivial!
Assuming you fix the OP's Makefile (so much for Makefile syntax usability):
# put into Makefile
THINGS_TO_CONVERT := $(wildcard *.svg)
all: $(patsubst %.pdf,%.svg,$(THINGS_TO_CONVERT))
inkscape $< --export-text-to-path --export-pdf=$@
# put into default.nix
with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/7ad5e816faba3f808e2a8815b14d0f023a4e2160.tar.gz") {};
stdenv.mkDerivation {
name = "zine-images";
src = ./.;
buildInputs = [ inkscape ];
installPhase = "mkdir $out && cp *.pdf $out";
}
Now make sure you have sandbox=true in /etc/nix.conf, run `nix build` in the directory, and boom done: hermetic build of zine images. Good thing too, I got a warning about --export-pdf being deprecated when I ran this. Note that running make or the dependency on make is not explicitly specified, mkDerivation has some basic smarts to figure out from the presence of a Makefile that it should run make.
(Hardcoding the version of nixpkgs directly into the default.nix just for demo purposes, better to use niv or similar to manage a json file with versions for you).
But it's trivial!
Assuming you fix the OP's Makefile (so much for Makefile syntax usability):
Now make sure you have sandbox=true in /etc/nix.conf, run `nix build` in the directory, and boom done: hermetic build of zine images. Good thing too, I got a warning about --export-pdf being deprecated when I ran this. Note that running make or the dependency on make is not explicitly specified, mkDerivation has some basic smarts to figure out from the presence of a Makefile that it should run make.(Hardcoding the version of nixpkgs directly into the default.nix just for demo purposes, better to use niv or similar to manage a json file with versions for you).