init
This commit is contained in:
41
flake.nix
Normal file
41
flake.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
description = "Clip Studio Paint thumbnailer for GNOME/Nautilus";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
csp-thumbnailer = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "csp-thumbnailer";
|
||||
version = "0.1.2";
|
||||
|
||||
src = self;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 ${./clip-thumbnailer.py} $out/bin/clip-thumbnailer
|
||||
ln -s $out/bin/clip-thumbnailer $out/bin/clip-extract-preview
|
||||
install -Dm644 ${./clip.thumbnailer} $out/share/thumbnailers/clip.thumbnailer
|
||||
install -Dm644 ${./clip-studio.xml} $out/share/mime/packages/clip-studio.xml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
default = self.packages.${system}.csp-thumbnailer;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user