From 1e9e6dbdd6edbfd8ac6249ba0d16e68b336cf093 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 3 Sep 2024 19:34:56 -0500 Subject: Added different outpaths to separate KoboRoot, png and other files --- pkgs/kfmon/default.nix | 15 +++++++++++++-- pkgs/koreader/default.nix | 11 +++++++++++ pkgs/nickel-menu/default.nix | 10 +++++++++- pkgs/plato/default.nix | 22 ++++++++++++++++++++-- 4 files changed, 53 insertions(+), 5 deletions(-) (limited to 'pkgs') diff --git a/pkgs/kfmon/default.nix b/pkgs/kfmon/default.nix index 6cb9c23..371c90f 100644 --- a/pkgs/kfmon/default.nix +++ b/pkgs/kfmon/default.nix @@ -9,14 +9,24 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-yaFRNdnlzelLsdGdmBjeH1hx8anYFx6zpcaRpRzqDlY="; }; + outputs = [ + "out" + "KoboRoot" + "png" + ]; + phases = "installPhase"; installPhase = '' runHook preInstall - cp -ra $src $out + cp -ra $src/.adds/kfmon $out + chmod +x $out/bin/kfmon-printlog.sh + + mkdir $KoboRoot + tar xvzf $src/.kobo/KoboRoot.tgz --directory=$KoboRoot - chmod +x $out/.adds/kfmon/bin/* + cp $src/kfmon.png $png runHook postInstall ''; @@ -25,5 +35,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { homepage = "https://github.com/NiLuJe/kfmon"; platform = platforms.all; license = licenses.gpl3Plus; + outputsToInstall = finalAttrs.outputs; }; }) diff --git a/pkgs/koreader/default.nix b/pkgs/koreader/default.nix index fb81d71..3f185b7 100644 --- a/pkgs/koreader/default.nix +++ b/pkgs/koreader/default.nix @@ -9,6 +9,12 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-9Ga42XSCC5FUQmlAygPhhXlFs0TIdxAf3/sWBmZ5URU="; }; + outputs = [ + "out" + "KoboRoot" + "png" + ]; + phases = "installPhase"; installPhase = '' @@ -16,6 +22,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp -ra $src/koreader $out + mkdir $KoboRoot + + cp $src/koreader.png $png + runHook postInstall ''; @@ -23,5 +33,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { homepage = "https://github.com/koreader/koreader"; platform = platforms.all; license = licenses.agpl3Plus; + outputsToInstall = finalAttrs.outputs; }; }) diff --git a/pkgs/nickel-menu/default.nix b/pkgs/nickel-menu/default.nix index c151aaf..92a374a 100644 --- a/pkgs/nickel-menu/default.nix +++ b/pkgs/nickel-menu/default.nix @@ -9,12 +9,19 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-BJC7zuvEHzI9zP9GR0K6psxumXcz5cDYhyCPxCsr8J0="; }; + outputs = [ + "out" + "KoboRoot" + ]; + phases = "installPhase"; installPhase = '' runHook preInstall - cp -ra $src $out + mkdir $out + + cp -ra $src $KoboRoot runHook postInstall ''; @@ -22,5 +29,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { meta = with lib; { homepage = "https://github.com/pgaskin/NickelMenu"; platform = platforms.all; + outputsToInstall = finalAttrs.outputs; }; }) diff --git a/pkgs/plato/default.nix b/pkgs/plato/default.nix index 797044c..2c7b5df 100644 --- a/pkgs/plato/default.nix +++ b/pkgs/plato/default.nix @@ -1,7 +1,9 @@ { stdenvNoCC, fetchzip, lib, ... }: -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "plato"; +let version = "0.9.43"; +in stdenvNoCC.mkDerivation (finalAttrs: { + pname = "plato"; + inherit version; src = fetchzip { url = "https://github.com/baskerville/plato/releases/download/${finalAttrs.version}/plato-${finalAttrs.version}.zip"; @@ -9,6 +11,17 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-1E9trfAF3w0+ix8JVDJwYjWQ/dfsLjLPmkCLJAYXkZU="; }; + picSrc = fetchzip { + url = "https://github.com/baskerville/plato/archive/refs/tags/${version}.zip"; + hash = "sha256-u9d/8C9rRb0glZR07tqz/d8EXO0bRddXlCFDje7ow2Y="; + }; + + outputs = [ + "out" + "KoboRoot" + "png" + ]; + phases = "installPhase"; installPhase = '' @@ -16,6 +29,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp -r $src $out + mkdir $KoboRoot + + cp $picSrc/artworks/plato.png $png + runHook postInstall ''; @@ -23,5 +40,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { homepage = "https://github.com/baskerville/plato"; platform = platforms.all; license = licenses.agpl3Plus; + outputsToInstall = finalAttrs.outputs; }; }) -- cgit v1.2.3