Add flake.nix with package
This commit is contained in:
@@ -17,6 +17,7 @@ xmlerrors
|
||||
.idea
|
||||
/cmake-build*
|
||||
.cache
|
||||
/result
|
||||
#index.theme is currently generated in the source dir
|
||||
icons/index.theme
|
||||
icons-dark/index.theme
|
||||
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1783224372,
|
||||
"narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d407951447dcd00442e97087bf374aad70c04cea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
description = "Breeze icons for docpond – processed icon set for document/mime-type association";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
# Supported systems
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = pkgsFor system;
|
||||
in {
|
||||
default = pkgs.stdenv.mkDerivation {
|
||||
pname = "breeze-icons-for-docpond";
|
||||
version = "0.1.0";
|
||||
src = self;
|
||||
|
||||
nativeBuildInputs = [ pkgs.python3 ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Patch the script so it writes directly to $out instead of hard-coded 'out/'
|
||||
substituteInPlace process_icons.py \
|
||||
--replace-fail "Path('out')" "Path(os.environ['out'])"
|
||||
|
||||
python3 process_icons.py
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# The script already placed everything in $out during buildPhase
|
||||
installPhase = "true";
|
||||
|
||||
# No strip, no fixup – we're delivering SVG icons, not executables
|
||||
dontFixup = true;
|
||||
dontStrip = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user