diff options
author | Gustavo Coutinho de Souza <dev@onemoresuza.mailer.me> | 2023-12-01 11:50:01 -0300 |
---|---|---|
committer | Gustavo Coutinho de Souza <dev@onemoresuza.mailer.me> | 2023-12-11 16:27:55 -0300 |
commit | e3b56dd7021b616f6925a918c68c6224714e2b43 (patch) | |
tree | 00d3d1fd96ac5497d090a78ef5432c492acc654e /pkgs/by-name/ha | |
parent | 5ee6ca04583366102eaba7cc8b24cf8d40c9b137 (diff) | |
download | nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar.gz nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar.bz2 nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar.lz nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar.xz nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.tar.zst nixlib-e3b56dd7021b616f6925a918c68c6224714e2b43.zip |
harec: migrate to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/ha')
-rw-r--r-- | pkgs/by-name/ha/harec/package.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/by-name/ha/harec/package.nix b/pkgs/by-name/ha/harec/package.nix new file mode 100644 index 000000000000..6ddb5ff1f01c --- /dev/null +++ b/pkgs/by-name/ha/harec/package.nix @@ -0,0 +1,63 @@ +{ lib +, stdenv +, fetchFromSourcehut +, qbe +, fetchgit +}: +let + # harec needs the dbgfile and dbgloc features implemented up to this commit. + # This can be dropped once 1.2 is released, for a possible release date see: + # https://lists.sr.ht/~mpu/qbe/%3CZPkmHE9KLohoEohE%40cloudsdale.the-delta.net.eu.org%3E + qbe' = qbe.overrideAttrs (_old: { + version = "1.1-unstable-2023-08-18"; + src = fetchgit { + url = "git://c9x.me/qbe.git"; + rev = "36946a5142c40b733d25ea5ca469f7949ee03439"; + hash = "sha256-bqxWFP3/aw7kRoD6ictbFcjzijktHvh4AgWAXBIODW8="; + }; + }); +in +stdenv.mkDerivation (finalAttrs: { + pname = "harec"; + version = "unstable-2023-10-22"; + + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "harec"; + rev = "64dea196ce040fbf3417e1b4fb11331688672aca"; + hash = "sha256-2Aeb+OZ/hYUyyxx6aTw+Oxiac+p+SClxtg0h68ZBSHc="; + }; + + nativeBuildInputs = [ + qbe' + ]; + + buildInputs = [ + qbe' + ]; + + strictDeps = true; + enableParallelBuilding = true; + + doCheck = true; + + passthru = { + # We create this attribute so that the `hare` package can access the + # overwritten `qbe`. + qbeUnstable = qbe'; + }; + + meta = { + homepage = "https://harelang.org/"; + description = "Bootstrapping Hare compiler written in C for POSIX systems"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ onemoresuza ]; + mainProgram = "harec"; + # The upstream developers do not like proprietary operating systems; see + # https://harelang.org/platforms/ + # UPDATE: https://github.com/hshq/harelang provides a MacOS port + platforms = with lib.platforms; + lib.intersectLists (freebsd ++ linux) (aarch64 ++ x86_64 ++ riscv64); + badPlatforms = lib.platforms.darwin; + }; +}) |