about summary refs log tree commit diff
path: root/pkgs/by-name/ha/hare/package.nix
diff options
context:
space:
mode:
authorCoutinho de Souza <dev@onemoresuza.com>2024-05-10 16:33:46 -0300
committerCoutinho de Souza <dev@onemoresuza.com>2024-05-14 11:56:31 -0300
commit476b34c50b938c44eb943e53df8a1971266bc87c (patch)
treea4cf5a954ea4b612ed378dbdeda3b62cd4d4cfeb /pkgs/by-name/ha/hare/package.nix
parent4876a6883fe94604ee573104a5ef3fd805774ad7 (diff)
hare: fix x86_64 make flags and remove `CC`
Remove `CC` since it is not used.

Capitalize x86_64 (from `x86_64` to `X86_64`) to embed their values on
the binary.

Patch the `hare` command so that it has the `-v` option for the
`version` subcommand. With it, is much easier to check the paths of the
toolchains, since we do not need to rely on:
`strings <path-to-hare-binary> | grep <toolchain-path>`
Diffstat (limited to 'pkgs/by-name/ha/hare/package.nix')
-rw-r--r--pkgs/by-name/ha/hare/package.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/by-name/ha/hare/package.nix b/pkgs/by-name/ha/hare/package.nix
index 53067ef37885e..a798cc46819c0 100644
--- a/pkgs/by-name/ha/hare/package.nix
+++ b/pkgs/by-name/ha/hare/package.nix
@@ -99,6 +99,11 @@ stdenv.mkDerivation (finalAttrs: {
     # Don't build haredoc since it uses the build `hare` bin, which breaks
     # cross-compilation.
     ./002-dont-build-haredoc.patch
+    # Display toolchains when using `hare version -v`.
+    (fetchpatch {
+      url = "https://git.sr.ht/~sircmpwn/hare/commit/e35f2284774436f422e06f0e8d290b173ced1677.patch";
+      hash = "sha256-A59bGO/9tOghV8/MomTxd8xRExkHVdoMom2d+HTfQGg=";
+    })
   ];
 
   nativeBuildInputs = [
@@ -122,7 +127,6 @@ stdenv.mkDerivation (finalAttrs: {
       "ARCH=${arch}"
       "VERSION=${finalAttrs.version}-nixpkgs"
       "QBEFLAGS=-t${qbePlatform}"
-      "CC=${stdenv.cc.targetPrefix}cc"
       "AS=${stdenv.cc.targetPrefix}as"
       "LD=${stdenv.cc.targetPrefix}ld"
       # Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
@@ -136,9 +140,9 @@ stdenv.mkDerivation (finalAttrs: {
       "AARCH64_AS=${embeddedOnBinaryTools.aarch64.as}"
       "AARCH64_CC=${embeddedOnBinaryTools.aarch64.cc}"
       "AARCH64_LD=${embeddedOnBinaryTools.aarch64.ld}"
-      "x86_64_AS=${embeddedOnBinaryTools.x86_64.as}"
-      "x86_64_CC=${embeddedOnBinaryTools.x86_64.cc}"
-      "x86_64_LD=${embeddedOnBinaryTools.x86_64.ld}"
+      "X86_64_AS=${embeddedOnBinaryTools.x86_64.as}"
+      "X86_64_CC=${embeddedOnBinaryTools.x86_64.cc}"
+      "X86_64_LD=${embeddedOnBinaryTools.x86_64.ld}"
     ];
 
   enableParallelBuilding = true;