From 8919570977447feda62377769f3ca2d4ad7439ed Mon Sep 17 00:00:00 2001 From: rucadi Date: Mon, 19 Feb 2024 18:03:08 +0100 Subject: [PATCH] construct: init at 0.1.0 Co-authored-by: Alexis Hildebrandt --- maintainers/maintainer-list.nix | 6 +++++ pkgs/by-name/co/construct/package.nix | 39 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/by-name/co/construct/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 74d2d045e1cb..1eada1892684 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -16564,6 +16564,12 @@ github = "rubyowo"; githubId = 105302757; }; + rucadi = { + email = "ruben.canodiaz@gmail.com"; + github = "rucadi"; + githubId = 6445619; + name = "Ruben Cano Diaz"; + }; rudolfvesely = { name = "Rudolf Vesely"; email = "i@rudolfvesely.com"; diff --git a/pkgs/by-name/co/construct/package.nix b/pkgs/by-name/co/construct/package.nix new file mode 100644 index 000000000000..eb2c922b31b4 --- /dev/null +++ b/pkgs/by-name/co/construct/package.nix @@ -0,0 +1,39 @@ +{ stdenv +, lib +, fetchFromGitHub +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "construct"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "Thomas-de-Bock"; + repo = "construct"; + rev = finalAttrs.version; + hash = "sha256-ENso0y7yEaXzGXzZOnlZ1L7+j/qayJL+f55/NYLz2ew="; + }; + + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile \ + --replace g++ c++ + ''; + + makeTarget = "main"; + + installPhase = '' + runHook preInstall + install -Dm755 bin/construct -t $out/bin + runHook postInstall + ''; + + meta = with lib; { + description = "Construct is an abstraction over x86 NASM Assembly"; + longDescription = "Construct adds features such as while loops, if statements, scoped macros and function-call syntax to NASM Assembly."; + homepage = "https://github.com/Thomas-de-Bock/construct"; + maintainers = with maintainers; [ rucadi ]; + platforms = platforms.all; + license = licenses.mit; + mainProgram = "construct"; + }; +})