19 stdenvNoCC.mkDerivation rec {
23 src = fetchFromGitHub {
27 sha256 = "sha256-llQt3m/qu7v5uQIfA1yxl2JZiFafk6sPgcvrIpQy/DI=";
40 comment = "An Application to save your Sharepoint videos for offline usage.";
41 desktopName = "Sharedown";
42 categories = [ "Network" "Archiving" ];
50 binPath = lib.makeBinPath ([
55 modules = yarn2nix-moretea.mkYarnModules rec {
56 name = "Sharedown-modules-${version}";
57 inherit pname version;
59 yarnFlags = [ "--production" ];
71 yarn --offline run build
72 # Remove unnecessary store path references.
78 # needed for node-gyp, copied from https://nixos.org/manual/nixpkgs/unstable/#javascript-yarn2nix-pitfalls
79 # permalink: https://github.com/NixOS/nixpkgs/blob/d176767c02cb2a048e766215078c3d231e666091/doc/languages-frameworks/javascript.section.md#pitfalls-javascript-yarn2nix-pitfalls
81 mkdir -p $HOME/.node-gyp/${nodejs.version}
82 echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
83 ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}
84 export npm_config_nodedir=${nodejs}
87 packageJSON = "${src}/package.json";
88 yarnLock = ./yarn.lock;
90 offlineCache = fetchYarnDeps {
92 hash = "sha256-NzWzkZbf5R1R72K7KVJbZUCzso1UZ0p3+lRYZE2M/dI=";
99 mkdir -p "$out/bin" "$out/share/Sharedown" "$out/share/applications" "$out/share/icons/hicolor/512x512/apps"
102 cp -r *.js *.json sharedownlogo.png sharedown "${modules}/node_modules" "$out/share/Sharedown"
105 cp build/icon.png "$out/share/icons/hicolor/512x512/apps/Sharedown.png"
107 # Install electron wrapper script
108 makeWrapper "${electron}/bin/electron" "$out/bin/Sharedown" \
109 --add-flags "$out/share/Sharedown" \
110 --prefix PATH : "${binPath}" \
111 --set PUPPETEER_EXECUTABLE_PATH "${chromium}/bin/chromium"
116 passthru.updateScript = ./update.sh;
119 description = "Application to save your Sharepoint videos for offline usage";
120 homepage = "https://github.com/kylon/Sharedown";
121 license = licenses.gpl3Plus;
122 maintainers = with maintainers; [
124 platforms = platforms.unix;
125 mainProgram = "Sharedown";