about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-01-05 08:13:09 -0500
committerGitHub <noreply@github.com>2023-01-05 08:13:09 -0500
commit22b07705b2fa8863b2368ed8a07e6d73da619eb7 (patch)
tree72ac6c04b5d178f1f145d462505779b8d41b9069 /pkgs/development
parente3e7a85fbd2f33b1693d7a13008bb9e7c1511fee (diff)
parenta0883d18f1ad92376807d339fa7d5704d4abb2e1 (diff)
Merge pull request #208209 from wegank/minilibx
minilibx: init at unstable-2021-10-30
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/minilibx/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/libraries/minilibx/default.nix b/pkgs/development/libraries/minilibx/default.nix
new file mode 100644
index 0000000000000..0551993e438a2
--- /dev/null
+++ b/pkgs/development/libraries/minilibx/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, libX11
+, libXext
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation {
+  pname = "minilibx";
+  version = "unstable-2021-10-30";
+
+  src = fetchFromGitHub {
+    owner = "42Paris";
+    repo = "minilibx-linux";
+    rev = "7dc53a411a7d4ae286c60c6229bd1e395b0efb82";
+    hash = "sha256-aRYMpaPC7dC6EHmmXugvwcQnaizRCQZKFcQX0K2MLM4=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  buildInputs = [
+    libX11
+    libXext
+  ];
+
+  dontConfigure = true;
+
+  makefile = "Makefile.mk";
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{include,lib}
+    cp mlx*.h $out/include
+    cp libmlx*.a $out/lib
+    installManPage man/man*/*
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "A simple X-Window (X11R6) programming API in C";
+    homepage = "https://github.com/42Paris/minilibx-linux";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+}