nixpkgs/pkgs/desktops/deepin/go-gir-generator/default.nix
2018-11-10 12:35:49 -02:00

45 lines
952 B
Nix

{ stdenv, fetchFromGitHub, pkgconfig, go, gobjectIntrospection,
libgudev, deepin }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "go-gir-generator";
version = "1.1.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "0grp4ffy3vmlknzmymnxq1spwshff2ylqsw82pj4y2v2fcvnqfvb";
};
nativeBuildInputs = [
pkgconfig
go
];
buildInputs = [
gobjectIntrospection
libgudev
];
postPatch = ''
sed -i -e 's:/share/gocode:/share/go:' Makefile
'';
makeFlags = [
"PREFIX=$(out)"
"GOCACHE=off"
];
passthru.updateScript = deepin.updateScript { inherit name; };
meta = with stdenv.lib; {
description = "Generate static golang bindings for GObject";
homepage = https://github.com/linuxdeepin/go-gir-generator;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}