diff options
author | legendofmiracles <legendofmiracles@protonmail.com> | 2021-06-19 05:08:37 -0600 |
---|---|---|
committer | legendofmiracles <legendofmiracles@protonmail.com> | 2021-06-19 23:43:22 -0600 |
commit | 507d17e2c801d1ce66bddc2c9cfc01670a3176cb (patch) | |
tree | 5eac588a590d201a1e2768aa2b14ea3c4e647c82 /pkgs/applications/audio | |
parent | 3e7ec42d6884aa6fff7b7e5802c1b988a443bca2 (diff) | |
download | nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar.gz nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar.bz2 nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar.lz nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar.xz nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.tar.zst nixpkgs-507d17e2c801d1ce66bddc2c9cfc01670a3176cb.zip |
noisetorch: 0.10.1 -> 0.11.3
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r-- | pkgs/applications/audio/noisetorch/default.nix | 29 | ||||
-rw-r--r-- | pkgs/applications/audio/noisetorch/version.patch | 37 |
2 files changed, 11 insertions, 55 deletions
diff --git a/pkgs/applications/audio/noisetorch/default.nix b/pkgs/applications/audio/noisetorch/default.nix index 6f63bf542f4..05e17bf7c98 100644 --- a/pkgs/applications/audio/noisetorch/default.nix +++ b/pkgs/applications/audio/noisetorch/default.nix @@ -1,42 +1,35 @@ -{ lib, buildGoModule, fetchFromGitHub, rnnoise-plugin }: +{ lib, buildGoModule, fetchFromGitHub, copyDesktopItems }: buildGoModule rec { pname = "NoiseTorch"; - version = "0.10.1"; + version = "0.11.3"; src = fetchFromGitHub { owner = "lawl"; repo = "NoiseTorch"; rev = version; - sha256 = "1a4g112h83m55pga8kq2a1wzxpycj59v4bygyjfyi1s09q1y97qg"; + sha256 = "0rjs6hbi7dvd179lzjmvqy4rv4pbc9amgzb8jfky4yc0zh8xf5z5"; }; - patches = [ - # Get version from environment instead of git tags - ./version.patch - ]; - vendorSha256 = null; doCheck = false; - subPackages = [ "." ]; + ldflags = [ "-X main.version=${version}" "-X main.distribution=nix" ]; - buildInputs = [ rnnoise-plugin ]; + subPackages = [ "." ]; - postPatch = "substituteInPlace main.go --replace 'librnnoise_ladspa/bin/ladspa/librnnoise_ladspa.so' '$RNNOISE_LADSPA_PLUGIN'"; + nativeBuildInputs = [ copyDesktopItems ]; preBuild = '' - export RNNOISE_LADSPA_PLUGIN="${rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; - go generate; + make -C c/ladspa/ + go generate rm ./scripts/* ''; postInstall = '' - mkdir -p $out/share/icons/hicolor/256x256/apps/ - cp assets/icon/noisetorch.png $out/share/icons/hicolor/256x256/apps/ - mkdir -p $out/share/applications/ - cp assets/noisetorch.desktop $out/share/applications/ + install -D ./assets/icon/noisetorch.png $out/share/icons/hicolor/256x256/apps/noisetorch.png + copyDesktopItems assets/noisetorch.desktop $out/share/applications/ ''; meta = with lib; { @@ -44,6 +37,6 @@ buildGoModule rec { homepage = "https://github.com/lawl/NoiseTorch"; license = licenses.gpl3Plus; platforms = platforms.linux; - maintainers = with maintainers; [ panaeon ]; + maintainers = with maintainers; [ panaeon legendofmiracles ]; }; } diff --git a/pkgs/applications/audio/noisetorch/version.patch b/pkgs/applications/audio/noisetorch/version.patch deleted file mode 100644 index 20c51863744..00000000000 --- a/pkgs/applications/audio/noisetorch/version.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/scripts/embedversion.go b/scripts/embedversion.go -index ce0a756..60e7a5e 100644 ---- a/scripts/embedversion.go -+++ b/scripts/embedversion.go -@@ -1,24 +1,18 @@ - package main - - import ( -- "os" -- "os/exec" -- "strings" -+ "os" -+ "strings" - ) - - func main() { -- cmd := exec.Command("git", "describe", "--tags") -- ret, err := cmd.Output() - -- if err != nil { -- panic("Couldn't read git tags to embed version number") -- } -- version := strings.TrimSpace(string(ret)) -+ version := strings.TrimSpace(string(os.Getenv("version"))) - -- out, _ := os.Create("version.go") -- defer out.Close() -+ out, _ := os.Create("version.go") -+ defer out.Close() - -- out.Write([]byte("package main\n\n//THIS FILE IS AUTOMATICALLY GENERATED BY `go generate` DO NOT EDIT!\n\nvar version=\"")) -- out.Write([]byte(version)) -- out.Write([]byte("\"\n")) -+ out.Write([]byte("package main\n\n//THIS FILE IS AUTOMATICALLY GENERATED BY `go generate` DO NOT EDIT!\n\nvar version=\"")) -+ out.Write([]byte(version)) -+ out.Write([]byte("\"\n")) - } |