From 71249330b3554d04b96247a4ddbbdf3c71ecc2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elizabeth=20Pa=C5=BA?= Date: Sat, 20 Aug 2022 10:52:52 +0200 Subject: [PATCH 1/2] ante: init at unstable-2022-08-22 --- pkgs/development/compilers/ante/default.nix | 53 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/compilers/ante/default.nix diff --git a/pkgs/development/compilers/ante/default.nix b/pkgs/development/compilers/ante/default.nix new file mode 100644 index 00000000000..7730c594204 --- /dev/null +++ b/pkgs/development/compilers/ante/default.nix @@ -0,0 +1,53 @@ +{ fetchFromGitHub +, lib +, libffi +, libxml2 +, llvmPackages_13 +, ncurses +, rustPlatform +}: + +rustPlatform.buildRustPackage { + pname = "ante"; + version = "unstable-2022-08-22"; + src = fetchFromGitHub { + owner = "jfecher"; + repo = "ante"; + rev = "8b708d549c213c34e4ca62d31cf0dd25bfa7b548"; + sha256 = "sha256-s8nDuG32lI4pBLsOzgfyUGpc7/r0j4EhzH54ErBK7A0="; + }; + cargoSha256 = "sha256-29D7kPG7vop9lIxWQnaHkCTRY8YsCjERRCOvbU7oemQ="; + + /* + https://crates.io/crates/llvm-sys#llvm-compatibility + llvm-sys requires a specific version of llvmPackages, + that is not the same as the one included by default with rustPlatform. + */ + nativeBuildInputs = [ llvmPackages_13.llvm ]; + buildInputs = [ libffi libxml2 ncurses ]; + + postPatch = '' + substituteInPlace tests/golden_tests.rs --replace \ + 'target/debug' "target/$(rustc -vV | sed -n 's|host: ||p')/release" + ''; + preBuild = + let + major = lib.versions.major llvmPackages_13.llvm.version; + minor = lib.versions.minor llvmPackages_13.llvm.version; + llvm-sys-ver = "${major}${builtins.substring 0 1 minor}"; + in + '' + # On some architectures llvm-sys is not using the package listed inside nativeBuildInputs + export LLVM_SYS_${llvm-sys-ver}_PREFIX=${llvmPackages_13.llvm.dev} + export ANTE_STDLIB_DIR=$out/lib + mkdir -p $ANTE_STDLIB_DIR + cp -r $src/stdlib/* $ANTE_STDLIB_DIR + ''; + + meta = with lib; { + homepage = "https://antelang.org/"; + description = "A low-level functional language for exploring refinement types, lifetime inference, and algebraic effects"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ ehllie ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 78297451107..9ebc99565fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12803,6 +12803,8 @@ with pkgs; algol68g = callPackage ../development/compilers/algol68g { }; + ante = callPackage ../development/compilers/ante { }; + armips = callPackage ../development/compilers/armips { stdenv = gcc10Stdenv; }; From d1fdd86238600c98201b1b6c1a27f4fad3dfbf0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elizabeth=20Pa=C5=BA?= Date: Sun, 21 Aug 2022 10:49:40 +0200 Subject: [PATCH 2/2] maintainers: add ehllie --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a514d31dc84..518fa092540 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3660,6 +3660,12 @@ github = "edlimerkaj"; githubId = 71988351; }; + ehllie = { + email = "me@ehllie.xyz"; + github = "ehllie"; + githubId = 20847625; + name = "Elizabeth Paź"; + }; elliottslaughter = { name = "Elliott Slaughter"; email = "elliottslaughter@gmail.com";