From 9eb88e04c45e324a39eb7b34130affd668ac086d Mon Sep 17 00:00:00 2001 From: reo101 Date: Thu, 13 Jul 2023 14:25:35 +0300 Subject: [PATCH] feat(pkgs): `advcp` -> `advcpmv` --- pkgs/advcp/default.nix | 24 ------------------------ pkgs/advcpmv/default.nix | 31 +++++++++++++++++++++++++++++++ pkgs/default.nix | 2 +- 3 files changed, 32 insertions(+), 25 deletions(-) delete mode 100644 pkgs/advcp/default.nix create mode 100644 pkgs/advcpmv/default.nix diff --git a/pkgs/advcp/default.nix b/pkgs/advcp/default.nix deleted file mode 100644 index 60d402b..0000000 --- a/pkgs/advcp/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, fetchurl, fetchpatch, upstream ? "coreutils" }: - -stdenv.mkDerivation rec { - name = "advcp"; - version = "9.1"; - - src = fetchurl { - name = "source-${name}-${version}.tar.xz"; - url = "ftp://ftp.gnu.org/gnu/${upstream}/${upstream}-${version}.tar.xz"; - hash = "sha256-YaH0ENeLp+fzelpPUObRMgrKMzdUhKMlXt3xejhYBCM="; - }; - - patches = [ - (fetchpatch { - url = "https://raw.githubusercontent.com/jarun/advcpmv/ea268d870b475edd5960dcd55d5378abc9705958/advcpmv-0.9-${version}.patch"; - hash = "sha256-d+SRT/R4xmfHLAdOr7m4R3WFiW64P5ZH6iqDvErYCyg="; - }) - ]; - - installPhase = '' - install -D src/cp $out/bin/advcp - install -D src/mv $out/bin/advmv - ''; -} diff --git a/pkgs/advcpmv/default.nix b/pkgs/advcpmv/default.nix new file mode 100644 index 0000000..e364edf --- /dev/null +++ b/pkgs/advcpmv/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, fetchpatch }: + +let + advcpmv_owner = "jarun"; + advcpmv_version = "0.9"; + coreutils_version = "9.1"; + coreutils_upstream = "coreutils"; + patch_rev = "69d2f9d3c72ec149fc7e06f5154af27db857ebb5"; +in +stdenv.mkDerivation rec { + name = "advcpmv"; + version = advcpmv_version; + + src = fetchurl { + name = "source-${name}-${coreutils_version}.tar.xz"; + url = "ftp://ftp.gnu.org/gnu/${coreutils_upstream}/${coreutils_upstream}-${coreutils_version}.tar.xz"; + sha256 = "sha256-YaH0ENeLp+fzelpPUObRMgrKMzdUhKMlXt3xejhYBCM="; + }; + + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/${advcpmv_owner}/${name}/${patch_rev}/${name}-${advcpmv_version}-${coreutils_version}.patch"; + sha256 = "sha256-l7kf2vz/heW3lgT89yDs5Wdfzw3Xbb3QhPGct7SCruQ="; + }) + ]; + + installPhase = '' + install -D "src/cp" "$out/bin/advcp" + install -D "src/mv" "$out/bin/advmv" + ''; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index f32a792..2c24f52 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,7 +5,7 @@ , ... }: { # example = pkgs.callPackage ./example { }; - advcp = pkgs.callPackage ./advcp { }; + advcpmv = pkgs.callPackage ./advcpmv { }; fennel-language-server = pkgs.callPackage ./fennel-language-server { }; parinfer-rust = pkgs.callPackage ./parinfer-rust { }; swww = pkgs.callPackage ./swww { };