From 83b84fc0bd1a64e2e44c51e9a3e4f714dcf4f222 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 22 May 2019 14:13:09 +0200 Subject: [PATCH] add ui package --- default.nix | 2 ++ pkgs/nim-packages/ui.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/nim-packages/ui.nix diff --git a/default.nix b/default.nix index b01e5af..9b0f3f5 100644 --- a/default.nix +++ b/default.nix @@ -6,4 +6,6 @@ self: super: gintro = super.callPackage ./pkgs/nim-packages/gintro/default.nix { }; shinto-cli = super.callPackage ./pkgs/shinto-cli { }; + + ui = super.callPackage ./pkgs/nim-packages/ui.nix { }; } diff --git a/pkgs/nim-packages/ui.nix b/pkgs/nim-packages/ui.nix new file mode 100644 index 0000000..3032748 --- /dev/null +++ b/pkgs/nim-packages/ui.nix @@ -0,0 +1,32 @@ +{ stdenv, buildNimblePackage, fetchFromGitHub, pkg-config, gtk3 }: + +buildNimblePackage rec { + name = "ui-${version}"; + version = "0.9.3"; + + src = fetchFromGitHub { + owner = "nim-lang"; + repo = "ui"; + rev = "2a2fd1e9050981dc5fa59529d4d2fbd6daaf793c"; + sha256 = "1dc6i8qrw6la2mzxlhcvvk1sm3gsi21bilrq213zqn949wsjxbzb"; + fetchSubmodules = true; + }; + + patchPhase = '' + rm ui/libui/common/OLD_table.c + rm ui/libui/unix/OLD_table.c + rm ui/libui/darwin/OLD_table.m + ''; + + buildInputs = [ pkg-config gtk3 ]; + + meta = with stdenv.lib; { + description = "Beginnings of what might become Nim's official UI library"; + homepage = https://github.com/nim-lang/ui; + license = licenses.mit; + maintainers = with maintainers; [ lurchi ]; + platforms = platforms.gnu ++ platforms.linux; + }; +} + +