File tree 4 files changed +51
-0
lines changed
4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 28
28
makeFlags = [ "prefix=$(out)" ] ;
29
29
}
30
30
) { } ;
31
+ logo = pkgs . callPackage ./logo/package.nix { } ;
31
32
}
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ white, keeping the spacing exact.
56
56
This variant is monochrome, with the shadow gradients baked-in as opacity
57
57
changes.
58
58
59
+ ### Optimized version
60
+
61
+ The SVG files in this directory are the authoring files.
62
+
63
+ In other words, they are busy with inkscape-specific properties, used when
64
+ editing the files.
65
+
66
+ If what is needed is a file optimized for size, and for using as an asset,
67
+ the Nix expression in this directory can be used to produce optimized SVGs.
68
+
69
+
59
70
License
60
71
-------
61
72
Original file line number Diff line number Diff line change
1
+ ( import ../. { } ) . logo
Original file line number Diff line number Diff line change
1
+ { runCommand
2
+ , lib
3
+ , inkscape
4
+ , nodePackages
5
+ } :
6
+
7
+ runCommand "nixos-artwork-logos" {
8
+ logos = [
9
+ # The snowflake-only variants
10
+ "nix-snowflake-colours"
11
+ "nix-snowflake-white"
12
+
13
+ # The horizontal variants
14
+ "nixos"
15
+ "nixos-white"
16
+
17
+ # The vertical variant
18
+ "nixos-text-below"
19
+ ] ;
20
+ src = lib . cleanSource ./. ;
21
+ nativeBuildInputs = [
22
+ inkscape
23
+ nodePackages . svgo
24
+ ] ;
25
+ } ''
26
+ PS4=" $ "
27
+ for f in $logos; do
28
+ mkdir -p $out
29
+ printf ":: ⇒ %s\n" "$f"
30
+ (set -x
31
+ inkscape --export-background-opacity=0 --export-plain-svg --export-filename=$out/$f.svg "$src/$f.svg"
32
+ inkscape --export-background-opacity=0 --export-filename=$out/$f.png "$src/$f.svg"
33
+ )
34
+ done
35
+ (set -x
36
+ svgo --pretty --multipass --folder "$out"
37
+ )
38
+ ''
You can’t perform that action at this time.
0 commit comments