1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/desktops/deepin/dde-api/default.nix
2018-11-10 12:27:38 -02:00

67 lines
1.5 KiB
Nix

{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig,
deepin-gettext-tools, go-dbus-factory, go-gir-generator, go-lib,
alsaLib, glib, gtk3, libcanberra, libgudev, librsvg, poppler,
pulseaudio, go, deepin }:
buildGoPackage rec {
name = "${pname}-${version}";
pname = "dde-api";
version = "3.5.0";
goPackagePath = "pkg.deepin.io/dde/api";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "1g3s0i5wa6qyv00yksz4r4cy2vhiknq8v0yx7aribvwm3gxf7jw3";
};
goDeps = ./deps.nix;
nativeBuildInputs = [
pkgconfig
deepin-gettext-tools
go-dbus-factory
go-gir-generator
go-lib
];
buildInputs = [
alsaLib
glib
gtk3
libcanberra
libgudev
librsvg
poppler
pulseaudio
];
postPatch = ''
patchShebangs .
sed -i -e "s|/var|$bin/var|" Makefile
'';
buildPhase = ''
make -C go/src/${goPackagePath}
'';
installPhase = ''
make install PREFIX="$bin" SYSTEMD_LIB_DIR="$bin/lib" -C go/src/${goPackagePath}
mkdir -p $out/share
mv $bin/share/gocode $out/share/go
remove-references-to -t ${go} $bin/bin/* $bin/lib/deepin-api/*
'';
passthru.updateScript = deepin.updateScript { inherit name; };
meta = with stdenv.lib; {
description = "Go-lang bindings for dde-daemon";
homepage = https://github.com/linuxdeepin/dde-api;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}