Merge pull request #217611 from figsoda/netease
netease-music-tui: replace patch with Cargo.lock
This commit is contained in:
commit
37ec5d119a
4 changed files with 2792 additions and 2795 deletions
2778
pkgs/applications/audio/netease-music-tui/Cargo.lock
generated
Normal file
2778
pkgs/applications/audio/netease-music-tui/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -11,7 +11,13 @@ rustPlatform.buildRustPackage rec {
|
||||||
sha256 = "sha256-+zRXihWg65DtyX3yD04CsW8aXIvNph36PW2veeg36lg=";
|
sha256 = "sha256-+zRXihWg65DtyX3yD04CsW8aXIvNph36PW2veeg36lg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoPatches = [ ./cargo-lock.patch ];
|
cargoLock = {
|
||||||
|
lockFile = ./Cargo.lock;
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
ln -s ${./Cargo.lock} Cargo.lock
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ alsa-lib openssl ];
|
buildInputs = [ alsa-lib openssl ];
|
||||||
|
|
17
pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
Normal file → Executable file
17
pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
Normal file → Executable file
|
@ -1,20 +1,17 @@
|
||||||
#!nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p coreutils gnugrep git cargo
|
#!nix-shell -i bash -p coreutils gnugrep git cargo
|
||||||
|
|
||||||
# This updates cargo-lock.patch for the netease-music-tui version listed in
|
# This updates cargo-lock.patch for the netease-music-tui version listed in
|
||||||
# default.nix.
|
# default.nix.
|
||||||
|
|
||||||
set -eu -o verbose
|
set -euo pipefail
|
||||||
|
|
||||||
here=$PWD
|
here=$(dirname "$0")
|
||||||
version=$(cat default.nix | grep '^ version = "' | cut -d '"' -f 2)
|
version=$(grep '^ version = "' "$here/default.nix" | cut -d '"' -f 2)
|
||||||
checkout=$(mktemp -d)
|
checkout=$(mktemp -d)
|
||||||
git clone -b "$version" --depth=1 https://github.com/betta-cyber/netease-music-tui "$checkout"
|
git clone -b "v$version" --depth=1 https://github.com/betta-cyber/netease-music-tui "$checkout"
|
||||||
cd "$checkout"
|
|
||||||
|
|
||||||
cargo generate-lockfile
|
cargo generate-lockfile --manifest-path "$checkout/Cargo.toml"
|
||||||
git add -f Cargo.lock
|
cp "$checkout/Cargo.lock" "$here"
|
||||||
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
|
|
||||||
|
|
||||||
cd "$here"
|
|
||||||
rm -rf "$checkout"
|
rm -rf "$checkout"
|
||||||
|
|
Loading…
Reference in a new issue