summary refs log tree commit diff
diff options
context:
space:
mode:
authorGustavo Coutinho de Souza <dev@onemoresuza.mailer.me>2023-11-02 23:36:18 -0300
committerGustavo Coutinho de Souza <dev@onemoresuza.mailer.me>2023-11-02 23:46:54 -0300
commitf4f39bab1683add162b62414d20df6b0a840a957 (patch)
tree696c7837ea2ca34c8517276d167f1422c7b89717
parent891e7b46b9b416c3e7833b06ba18189de9ab9e00 (diff)
downloadnixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar.gz
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar.bz2
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar.lz
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar.xz
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.tar.zst
nixpkgs-f4f39bab1683add162b62414d20df6b0a840a957.zip
aba: 0.7.0 -> 0.7.1
And also the following changes:

1. Make use of `just` as the build framework; and
2. Remove meta attribute platforms, since it is set by
   `buildRustPackage`.
-rw-r--r--pkgs/by-name/ab/aba/package.nix29
1 files changed, 18 insertions, 11 deletions
diff --git a/pkgs/by-name/ab/aba/package.nix b/pkgs/by-name/ab/aba/package.nix
index 4e62d4da8d0..14a32c61375 100644
--- a/pkgs/by-name/ab/aba/package.nix
+++ b/pkgs/by-name/ab/aba/package.nix
@@ -6,7 +6,7 @@
 , scdoc
 }:
 let
-  version = "0.7.0";
+  version = "0.7.1";
 in
 rustPlatform.buildRustPackage {
   pname = "aba";
@@ -16,27 +16,35 @@ rustPlatform.buildRustPackage {
     owner = "~onemoresuza";
     repo = "aba";
     rev = version;
-    hash = "sha256-YPE5HYa90BcNy5jdYbzkT81KavJcbSeGrsWRILnIiEE=";
+    hash = "sha256-Sz9I1Dw7wmoUPpTBNfbYbehfNO8FK6r/ubofx+FGb04=";
     domain = "sr.ht";
   };
 
-  cargoSha256 = "sha256-wzI+UMcVeFQNFlWDkyxk8tjpU7beNRKoPYbid8b15/Q=";
+  cargoSha256 = "sha256-Ihoh+yp12qN74JHvJbEDoYz+eoMwPOQar+yBEy+bqb0=";
 
   nativeBuildInputs = [
     just
     scdoc
   ];
 
+  postPatch = ''
+    # Suppress messages of command not found. jq is not needed for the build, but just calls it anyway.
+    sed -i '/[[:space:]]*|[[:space:]]*jq -r/s/jq -r .*/: \\/' ./justfile
+    # Let only nix strip the binary by disabling cargo's `strip = true`, like buildRustPackage does.
+    sed -i '/strip[[:space:]]*=[[:space:]]*true/s/true/false/' ./Cargo.toml
+  '';
+
+  preBuild = ''
+    justFlagsArray+=(
+      PREFIX=${builtins.placeholder "out"}
+      MANIFEST_OPTS="--frozen --locked --profile=release"
+      INSTALL_OPTS=--no-track
+    )
+  '';
+
   # There are no tests
   doCheck = false;
-
-  dontUseJustBuild = true;
   dontUseJustCheck = true;
-  dontUseJustInstall = true;
-
-  postInstall = ''
-    just --set PREFIX $out install-doc
-  '';
 
   passthru.updateScript = nix-update-script { };
 
@@ -47,7 +55,6 @@ rustPlatform.buildRustPackage {
     downloadPage = "https://git.sr.ht/~onemoresuza/aba/refs/${version}";
     maintainers = with lib.maintainers; [ onemoresuza ];
     license = lib.licenses.isc;
-    platforms = lib.platforms.unix;
     mainProgram = "aba";
   };
 }