-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
136 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ lib, buildPackages, buildGoModule, fetchFromGitHub, esbuild, buildNpmPackage, fetchFromGitea }: | ||
|
||
let | ||
esbuild' = buildPackages.esbuild.override { | ||
buildGoModule = args: buildPackages.buildGoModule (args // rec { | ||
version = "0.16.15"; | ||
src = fetchFromGitHub { | ||
owner = "evanw"; | ||
repo = "esbuild"; | ||
rev = "v${version}"; | ||
hash = "sha256-iTAtPHjrBvHweSIiAbkkbBLgjF3v68jipJEzc0I4G04="; | ||
}; | ||
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ="; | ||
}); | ||
}; | ||
in buildNpmPackage rec { | ||
pname = "kaufkauflist"; | ||
version = "1.0.0"; | ||
|
||
src = fetchFromGitea { | ||
domain = "codeberg.org"; | ||
owner = "annaaurora"; | ||
repo = "kaufkauflist"; | ||
rev = "v${version}"; | ||
hash = "sha256-feqk2FUs3lcnIgyPzhsow+xO9u7l9+9eZEk9jxRlpG4="; | ||
}; | ||
|
||
npmDepsHash = "sha256-lSnGLK7+ac/wEpAxlpkZS/kgr9F+8WK+nRjCzkrPJt0="; | ||
|
||
ESBUILD_BINARY_PATH = "${lib.getExe esbuild'}"; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/share/kaufkauflist $out/share/pocketbase | ||
cp -vr build/* $out/share/kaufkauflist/ | ||
cp -v pb_schema.json $out/share/pocketbase/ | ||
runHook postInstall | ||
''; | ||
|
||
# Uncomment this when nix-update-script supports Gitea. | ||
#passthru.updateScript = nix-update-script { }; | ||
|
||
meta = with lib; { | ||
homepage = "https://codeberg.org/annaaurora/kaufkauflist"; | ||
description = "A to-do list for shopping or other use cases"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ annaaurora ]; | ||
}; | ||
} |
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
36 changes: 36 additions & 0 deletions
36
pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ lib , buildNpmPackage , fetchFromGitHub, nodejs }: | ||
|
||
buildNpmPackage rec { | ||
pname = "webtorrent-mpv-hook"; | ||
version = "1.3.3"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "mrxdst"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
hash = "sha256-AFKX31kriacXygZy0Mw+QwO+SwFEu13687mJ/WeAoKY="; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'" | ||
# This executable is just for telling non-Nix users how to install | ||
substituteInPlace package.json --replace '"bin": "build/bin.js",' "" | ||
rm -rf src/bin.ts | ||
''; | ||
|
||
npmDepsHash = "sha256-GpNUJ5ZCgMjSYLqsIE/RwkTSFT3uAhxrHPe7XvGDRHE="; | ||
makeCacheWritable = true; | ||
|
||
postInstall = '' | ||
mkdir -p $out/share/mpv/scripts/ | ||
ln -s $out/lib/node_modules/webtorrent-mpv-hook/build/webtorrent.js $out/share/mpv/scripts/ | ||
''; | ||
passthru.scriptName = "webtorrent.js"; | ||
|
||
meta = { | ||
description = "Adds a hook that allows mpv to stream torrents"; | ||
homepage = "https://github.com/mrxdst/webtorrent-mpv-hook"; | ||
maintainers = [ lib.maintainers.chuangzhu ]; | ||
license = lib.licenses.isc; | ||
}; | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.