-
-
Save W-Y-R/4fd6721891fe928127cea89031adee2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv | |
, makeWrapper | |
, electron_24 | |
, nodejs | |
, nodePackages | |
, fetchFromGitHub | |
, lib | |
}: | |
stdenv.mkDerivation rec { | |
pname = "iconshelf"; | |
version = "0.1.18"; | |
src = fetchFromGitHub { | |
owner = "Icon-Shelf"; | |
repo = "icon-shelf"; | |
rev = "v${version}"; | |
sha256 = "aDQ1enACF/10FrmqBHdTkIG8g3QpagzQS+eraOTpcOY="; | |
}; | |
buildInputs = [ nodejs electron_24 ]; | |
nativeBuildInputs = [ makeWrapper nodePackages.node2nix ]; | |
dontConfigure = true; | |
installPhase = '' | |
mkdir -p $out/bin | |
makeWrapper ${electron_24}/bin/electron $out/bin/iconshelf \ | |
--add-flags $out/lib/${pname}/main.js | |
''; | |
electron = electron_24; | |
buildPhase = '' | |
npm install | |
npm run compile | |
mkdir -p $out/lib/${pname} | |
cp -r packages/main $out/lib/${pname} | |
''; | |
meta = with lib; { | |
description = "Short description of the package"; | |
homepage = "https://github.com/Icon-Shelf/${pname}"; | |
license = licenses.mit; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment