Repository navigation
Expand file tree
/
Copy pathpackage.nix
More file actions
56 lines (52 loc) · 1.47 KB
/
Copy pathpackage.nix
File metadata and controls
56 lines (52 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
lib,
rustPlatform,
makeWrapper,
callPackage,
writeShellScript,
dejavu_fonts,
liberation_ttf,
jetbrains-mono,
fonts ? [
dejavu_fonts
liberation_ttf
jetbrains-mono
],
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "gfty";
version = "0.1.0";
src = lib.cleanSource ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram $out/bin/gfty \
--prefix GFTY_FONT_DIRS : ${lib.escapeShellArg (lib.concatStringsSep ":" (map toString fonts))}
'';
passthru = {
mkLabel =
args:
callPackage ./nix/mk-label.nix {
gfty = finalAttrs.finalPackage;
inherit args;
};
mkPlate =
args:
callPackage ./nix/mk-plate.nix {
gfty = finalAttrs.finalPackage;
inherit args;
};
mkBin = args: callPackage ./nix/mk-bin.nix { inherit args; };
mkBase = args: callPackage ./nix/mk-base.nix { inherit args; };
mkRim = args: callPackage ./nix/mk-rim.nix { inherit args; };
mkSwappableLabel = args: callPackage ./nix/mk-swappable-label.nix { inherit args; };
mkBinSet = args: callPackage ./nix/mk-bin-set.nix { inherit args; };
mkOutputSet = args: callPackage ./nix/mk-output-set.nix args;
writeExportScript = name: text: writeShellScript name text;
};
meta = {
description = "Reproducible Gridfinity bin and label authoring with Onshape export";
license = lib.licenses.mit;
mainProgram = "gfty";
};
})