depot/pkgs/servers/web-apps/freshrss/extensions/freshrss-utils.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

45 lines
1 KiB
Nix

{ stdenv, unzip }:
let
buildFreshRssExtension =
args@{ pname
, version
, src
, FreshRssExtUniqueId
, configurePhase ? ''
runHook preConfigure
runHook postConfigure
''
, buildPhase ? ''
runHook preBuild
runHook postBuild
''
, dontPatchELF ? true
, dontStrip ? true
, passthru ? { }
, sourceRoot ? "source"
, ...
}:
stdenv.mkDerivation ((removeAttrs args [ "FreshRssExtUniqueId" ]) // {
pname = "freshrss-extension-${pname}";
inherit version src configurePhase buildPhase dontPatchELF dontStrip sourceRoot;
installPrefix = "share/freshrss/extensions/xExtension-${FreshRssExtUniqueId}";
installPhase = ''
runHook preInstall
mkdir -p "$out/$installPrefix"
find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/"
runHook postInstall
'';
passthru = passthru // {
inherit FreshRssExtUniqueId;
};
});
in
{
inherit buildFreshRssExtension;
}