20 stdenvNoCC.mkDerivation rec {
24 src = fetchFromGitHub {
28 sha256 = "sha256-llQt3m/qu7v5uQIfA1yxl2JZiFafk6sPgcvrIpQy/DI=";
41 comment = "An Application to save your Sharepoint videos for offline usage.";
42 desktopName = "Sharedown";
54 binPath = lib.makeBinPath ([
59 modules = yarn2nix-moretea.mkYarnModules rec {
60 name = "Sharedown-modules-${version}";
61 inherit pname version;
63 yarnFlags = [ "--production" ];
75 yarn --offline run build
76 # Remove unnecessary store path references.
82 # needed for node-gyp, copied from https://nixos.org/manual/nixpkgs/unstable/#javascript-yarn2nix-pitfalls
83 # permalink: https://github.com/NixOS/nixpkgs/blob/d176767c02cb2a048e766215078c3d231e666091/doc/languages-frameworks/javascript.section.md#pitfalls-javascript-yarn2nix-pitfalls
85 mkdir -p $HOME/.node-gyp/${nodejs.version}
86 echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
87 ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}
88 export npm_config_nodedir=${nodejs}
91 packageJSON = "${src}/package.json";
92 yarnLock = ./yarn.lock;
94 offlineCache = fetchYarnDeps {
96 hash = "sha256-NzWzkZbf5R1R72K7KVJbZUCzso1UZ0p3+lRYZE2M/dI=";
103 mkdir -p "$out/bin" "$out/share/Sharedown" "$out/share/applications" "$out/share/icons/hicolor/512x512/apps"
106 cp -r *.js *.json sharedownlogo.png sharedown "${modules}/node_modules" "$out/share/Sharedown"
109 cp build/icon.png "$out/share/icons/hicolor/512x512/apps/Sharedown.png"
111 # Install electron wrapper script
112 makeWrapper "${electron}/bin/electron" "$out/bin/Sharedown" \
113 --add-flags "$out/share/Sharedown" \
114 --prefix PATH : "${binPath}" \
115 --set PUPPETEER_EXECUTABLE_PATH "${chromium}/bin/chromium"
120 passthru.updateScript = ./update.sh;
123 description = "Application to save your Sharepoint videos for offline usage";
124 homepage = "https://github.com/kylon/Sharedown";
125 license = licenses.gpl3Plus;
126 maintainers = with maintainers; [
128 platforms = platforms.unix;
129 mainProgram = "Sharedown";