From 5ca82ffa08af81f36ec998e7f49f53af7496a93a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 2 Nov 2026 19:53:17 +0100 Subject: pkgs/*: Use a `stable`/`unstable` marker in the filename --- pkgs/by-name/mp/mpdpopm/package.nix | 29 ------- pkgs/by-name/mp/mpdpopm/package.unstable.nix | 29 +++++++ pkgs/by-name/mp/mpp-beetrm/package.nix | 25 ------ pkgs/by-name/mp/mpp-beetrm/package.unstable.nix | 25 ++++++ pkgs/by-name/mp/mpp-lyrics/package.nix | 31 -------- pkgs/by-name/mp/mpp-lyrics/package.unstable.nix | 31 ++++++++ pkgs/by-name/mp/mpp-searchadd/package.nix | 25 ------ pkgs/by-name/mp/mpp-searchadd/package.unstable.nix | 25 ++++++ pkgs/by-name/mp/mpp/package.nix | 90 ---------------------- pkgs/by-name/mp/mpp/package.unstable.nix | 90 ++++++++++++++++++++++ 10 files changed, 200 insertions(+), 200 deletions(-) delete mode 100644 pkgs/by-name/mp/mpdpopm/package.nix create mode 100644 pkgs/by-name/mp/mpdpopm/package.unstable.nix delete mode 100644 pkgs/by-name/mp/mpp-beetrm/package.nix create mode 100644 pkgs/by-name/mp/mpp-beetrm/package.unstable.nix delete mode 100644 pkgs/by-name/mp/mpp-lyrics/package.nix create mode 100644 pkgs/by-name/mp/mpp-lyrics/package.unstable.nix delete mode 100644 pkgs/by-name/mp/mpp-searchadd/package.nix create mode 100644 pkgs/by-name/mp/mpp-searchadd/package.unstable.nix delete mode 100644 pkgs/by-name/mp/mpp/package.nix create mode 100644 pkgs/by-name/mp/mpp/package.unstable.nix (limited to 'pkgs/by-name/mp') diff --git a/pkgs/by-name/mp/mpdpopm/package.nix b/pkgs/by-name/mp/mpdpopm/package.nix deleted file mode 100644 index 7048f41e..00000000 --- a/pkgs/by-name/mp/mpdpopm/package.nix +++ /dev/null @@ -1,29 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - rustPlatform, - lib, -}: -rustPlatform.buildRustPackage (finalAttrs: { - pname = "mpdpopm"; - version = "0.1.0"; - - buildInputs = []; - nativeBuildInputs = []; - - src = ./.; - cargoLock = { - lockFile = ./Cargo.lock; - }; - - meta = { - mainProgram = "mpdpopm"; - }; -}) diff --git a/pkgs/by-name/mp/mpdpopm/package.unstable.nix b/pkgs/by-name/mp/mpdpopm/package.unstable.nix new file mode 100644 index 00000000..7048f41e --- /dev/null +++ b/pkgs/by-name/mp/mpdpopm/package.unstable.nix @@ -0,0 +1,29 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + rustPlatform, + lib, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "mpdpopm"; + version = "0.1.0"; + + buildInputs = []; + nativeBuildInputs = []; + + src = ./.; + cargoLock = { + lockFile = ./Cargo.lock; + }; + + meta = { + mainProgram = "mpdpopm"; + }; +}) diff --git a/pkgs/by-name/mp/mpp-beetrm/package.nix b/pkgs/by-name/mp/mpp-beetrm/package.nix deleted file mode 100644 index 00672838..00000000 --- a/pkgs/by-name/mp/mpp-beetrm/package.nix +++ /dev/null @@ -1,25 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - writeShellApplication, - # Dependencies - mpc, - beets, -}: -writeShellApplication { - name = "mpp-beetrm"; - text = builtins.readFile ./mpp-beetrm.sh; - inheritPath = false; - - runtimeInputs = [ - mpc - beets - ]; -} diff --git a/pkgs/by-name/mp/mpp-beetrm/package.unstable.nix b/pkgs/by-name/mp/mpp-beetrm/package.unstable.nix new file mode 100644 index 00000000..00672838 --- /dev/null +++ b/pkgs/by-name/mp/mpp-beetrm/package.unstable.nix @@ -0,0 +1,25 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + writeShellApplication, + # Dependencies + mpc, + beets, +}: +writeShellApplication { + name = "mpp-beetrm"; + text = builtins.readFile ./mpp-beetrm.sh; + inheritPath = false; + + runtimeInputs = [ + mpc + beets + ]; +} diff --git a/pkgs/by-name/mp/mpp-lyrics/package.nix b/pkgs/by-name/mp/mpp-lyrics/package.nix deleted file mode 100644 index 0b6d8993..00000000 --- a/pkgs/by-name/mp/mpp-lyrics/package.nix +++ /dev/null @@ -1,31 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - writeShellApplication, - # Dependencies - exiftool, - mpc, - jq, - less, - locale, # dependency of less -}: -writeShellApplication { - name = "mpp-lyrics"; - text = builtins.readFile ./mpp-lyrics.sh; - inheritPath = false; - - runtimeInputs = [ - exiftool - mpc - jq - less - locale # dependency of less - ]; -} diff --git a/pkgs/by-name/mp/mpp-lyrics/package.unstable.nix b/pkgs/by-name/mp/mpp-lyrics/package.unstable.nix new file mode 100644 index 00000000..0b6d8993 --- /dev/null +++ b/pkgs/by-name/mp/mpp-lyrics/package.unstable.nix @@ -0,0 +1,31 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + writeShellApplication, + # Dependencies + exiftool, + mpc, + jq, + less, + locale, # dependency of less +}: +writeShellApplication { + name = "mpp-lyrics"; + text = builtins.readFile ./mpp-lyrics.sh; + inheritPath = false; + + runtimeInputs = [ + exiftool + mpc + jq + less + locale # dependency of less + ]; +} diff --git a/pkgs/by-name/mp/mpp-searchadd/package.nix b/pkgs/by-name/mp/mpp-searchadd/package.nix deleted file mode 100644 index 91ff05e9..00000000 --- a/pkgs/by-name/mp/mpp-searchadd/package.nix +++ /dev/null @@ -1,25 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - writeShellApplication, - # Dependencies. - mpc, - beets, -}: -writeShellApplication { - name = "mpp-searchadd"; - text = builtins.readFile ./mpp-searchadd.sh; - inheritPath = false; - - runtimeInputs = [ - mpc - beets - ]; -} diff --git a/pkgs/by-name/mp/mpp-searchadd/package.unstable.nix b/pkgs/by-name/mp/mpp-searchadd/package.unstable.nix new file mode 100644 index 00000000..91ff05e9 --- /dev/null +++ b/pkgs/by-name/mp/mpp-searchadd/package.unstable.nix @@ -0,0 +1,25 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + writeShellApplication, + # Dependencies. + mpc, + beets, +}: +writeShellApplication { + name = "mpp-searchadd"; + text = builtins.readFile ./mpp-searchadd.sh; + inheritPath = false; + + runtimeInputs = [ + mpc + beets + ]; +} diff --git a/pkgs/by-name/mp/mpp/package.nix b/pkgs/by-name/mp/mpp/package.nix deleted file mode 100644 index fe08ba46..00000000 --- a/pkgs/by-name/mp/mpp/package.nix +++ /dev/null @@ -1,90 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - writeShellApplication, - symlinkJoin, - stdenv, - # Dependencies - mpc, - mpp-searchadd, - mpp-lyrics, - mpp-beetrm, - mpdpopm, - # Build dependencies - fd, - zsh, -}: let - script = writeShellApplication { - name = "mpp"; - text = builtins.readFile ./mpp.sh; - inheritPath = false; - - runtimeInputs = [ - mpc - mpp-searchadd - mpp-lyrics - mpp-beetrm - mpdpopm - ]; - }; - - mpcShare = stdenv.mkDerivation { - name = "mpp-only-share"; - nativeBuildInputs = [fd]; - strictDeps = true; - - src = mpc; - - buildPhase = '' - fixMpc() { - file_path="$1" - - new_file_path="$(echo "$file_path" | sed "s|mpc|mpp|g")" - - echo "Fixing '$file_path' -> '$new_file_path'.." - - [ -f "$file_path"] && mkdir --parents "$(dirname "$new_file_path")" - - mv "$file_path" "$new_file_path" - } - - # Copy the zsh bundled `mpc` completions to `mpp` - # TODO: Also add completions for the new subcommands <2024-11-17> - mkdir --parents share/zsh/site-functions; - cp "${zsh}/share/zsh/${zsh.version}/functions/_mpc" "share/zsh/site-functions" - - # Replace all reverences to `mpc`. First all files - fd "mpc" "." --hidden --type file | while read -r file_path; do - fixMpc "$file_path" - done - # Then their possible parent directories. - fd "mpc" "." --hidden --type directory | while read -r file_path; do - fixMpc "$file_path" - done - # Now patch all reverences to `mpc` away - fd "." --hidden --type file | while read -r file_path; do - sed --in-place 's/mpc/mpp/g' "$file_path" - done - - # TODO(@bpeetz): Also change this in man-pages. <2025-05-20> - ''; - - installPhase = '' - mkdir "$out"; - cp --recursive ./share "$out/share"; - ''; - }; -in - symlinkJoin { - name = "mpp"; - paths = [script mpcShare]; - - inherit (script) meta; - } diff --git a/pkgs/by-name/mp/mpp/package.unstable.nix b/pkgs/by-name/mp/mpp/package.unstable.nix new file mode 100644 index 00000000..fe08ba46 --- /dev/null +++ b/pkgs/by-name/mp/mpp/package.unstable.nix @@ -0,0 +1,90 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + writeShellApplication, + symlinkJoin, + stdenv, + # Dependencies + mpc, + mpp-searchadd, + mpp-lyrics, + mpp-beetrm, + mpdpopm, + # Build dependencies + fd, + zsh, +}: let + script = writeShellApplication { + name = "mpp"; + text = builtins.readFile ./mpp.sh; + inheritPath = false; + + runtimeInputs = [ + mpc + mpp-searchadd + mpp-lyrics + mpp-beetrm + mpdpopm + ]; + }; + + mpcShare = stdenv.mkDerivation { + name = "mpp-only-share"; + nativeBuildInputs = [fd]; + strictDeps = true; + + src = mpc; + + buildPhase = '' + fixMpc() { + file_path="$1" + + new_file_path="$(echo "$file_path" | sed "s|mpc|mpp|g")" + + echo "Fixing '$file_path' -> '$new_file_path'.." + + [ -f "$file_path"] && mkdir --parents "$(dirname "$new_file_path")" + + mv "$file_path" "$new_file_path" + } + + # Copy the zsh bundled `mpc` completions to `mpp` + # TODO: Also add completions for the new subcommands <2024-11-17> + mkdir --parents share/zsh/site-functions; + cp "${zsh}/share/zsh/${zsh.version}/functions/_mpc" "share/zsh/site-functions" + + # Replace all reverences to `mpc`. First all files + fd "mpc" "." --hidden --type file | while read -r file_path; do + fixMpc "$file_path" + done + # Then their possible parent directories. + fd "mpc" "." --hidden --type directory | while read -r file_path; do + fixMpc "$file_path" + done + # Now patch all reverences to `mpc` away + fd "." --hidden --type file | while read -r file_path; do + sed --in-place 's/mpc/mpp/g' "$file_path" + done + + # TODO(@bpeetz): Also change this in man-pages. <2025-05-20> + ''; + + installPhase = '' + mkdir "$out"; + cp --recursive ./share "$out/share"; + ''; + }; +in + symlinkJoin { + name = "mpp"; + paths = [script mpcShare]; + + inherit (script) meta; + } -- cgit v1.3.1