summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Flynn <getchoo@tuta.io>2025-03-31 20:03:04 -0400
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2025-04-14 07:29:22 +0000
commit27a775dd8fe0231e24345aee742d5e802cf5a840 (patch)
tree2c5e3174aeec59315ea18dec89a6d810eb4d1b12
parent[Backport release-24.11] vencord: 1.11.8 -> 1.11.9 (#398502) (diff)
downloadnixpkgs-origin/backport-395363-to-release-24.11.tar.gz
(cherry picked from commit 2d40122e73e724d3880076c28ae6e7d43de955aa)
-rw-r--r--pkgs/by-name/sc/scotty/package.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/by-name/sc/scotty/package.nix b/pkgs/by-name/sc/scotty/package.nix
new file mode 100644
index 000000000000..4b9fa3a0ac09
--- /dev/null
+++ b/pkgs/by-name/sc/scotty/package.nix
@@ -0,0 +1,54 @@
+{
+ lib,
+ stdenv,
+ buildGoModule,
+ fetchFromSourcehut,
+ nix-update-script,
+ testers,
+}:
+
+buildGoModule (finalAttrs: {
+ pname = "scotty";
+ version = "0.4.1";
+
+ src = fetchFromSourcehut {
+ owner = "~phw";
+ repo = "scotty";
+ rev = "v${finalAttrs.version}";
+ hash = "sha256-R9MgX5Am//9ULNKWqfH/JthMhqg4FFitOds7wU5iDSU=";
+ };
+
+ # Otherwise checks fail with `panic: open /etc/protocols: operation not permitted` when sandboxing is enabled on Darwin
+ # https://github.com/NixOS/nixpkgs/pull/381645#issuecomment-2656211797
+ modPostBuild = ''
+ substituteInPlace vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go \
+ --replace-fail '!os.IsNotExist(err)' '!os.IsNotExist(err) && !os.IsPermission(err)'
+ '';
+
+ vendorHash = "sha256-DxtouPfysXsr436YwK9V88rff1hf9Ga7EYytZxxLd/g=";
+
+ env = {
+ # *Some* locale is required to be set
+ # https://git.sr.ht/~phw/scotty/tree/04eddfda33cc6f0b87dc0fcea43d5c4f50923ddc/item/internal/i18n/i18n.go#L30
+ LC_ALL = "C.UTF-8";
+ };
+
+ passthru = {
+ tests.version = testers.testVersion {
+ # See above
+ command = "LC_ALL='C.UTF-8' scotty --version";
+ package = finalAttrs.finalPackage;
+ };
+
+ updateScript = nix-update-script { };
+ };
+
+ meta = {
+ description = "Transfers your listens between various music listen tracking and streaming services";
+ homepage = "https://git.sr.ht/~phw/scotty";
+ changelog = "https://git.sr.ht/~phw/scotty/refs/v${finalAttrs.version}";
+ license = lib.licenses.gpl3Only;
+ maintainers = with lib.maintainers; [ getchoo ];
+ mainProgram = "scotty";
+ };
+})