Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / display-managers / lightdm-mobile-greeter / default.nix
blobb0d8ed5152615d89f752e52129da8832f5c35faf
1 { lib
2 , fetchFromGitea
3 , gtk3
4 , libhandy_0
5 , lightdm
6 , lightdm-mobile-greeter
7 , linkFarm
8 , pkg-config
9 , rustPlatform
12 rustPlatform.buildRustPackage rec {
13   pname = "lightdm-mobile-greeter";
14   version = "2022-10-30";
16   src = fetchFromGitea {
17     domain = "git.raatty.club";
18     owner = "raatty";
19     repo = "lightdm-mobile-greeter";
20     rev = "8c8d6dfce62799307320c8c5a1f0dd5c8c18e4d3";
21     hash = "sha256-SrAR2+An3BN/doFl/s8PcYZMUHLfVPXKZOo6ndO60nY=";
22   };
23   cargoLock = {
24     lockFile = ./Cargo.lock;
25     outputHashes = {
26       "light-dm-sys-0.0.1" = "sha256-91MZhbO/Or0QOt0yVAUhtorpMBBzElFg6U59mF7WB0k=";
27     };
28   };
30   buildInputs = [
31     gtk3
32     libhandy_0
33     lightdm
34   ];
35   nativeBuildInputs = [
36     pkg-config
37   ];
39   postInstall = ''
40     mkdir -p $out/share/xgreeters
41     substitute lightdm-mobile-greeter.desktop \
42       $out/share/xgreeters/lightdm-mobile-greeter.desktop \
43       --replace lightdm-mobile-greeter $out/bin/lightdm-mobile-greeter
44   '';
46   passthru.xgreeters = linkFarm "lightdm-mobile-greeter-xgreeters" [{
47     path = "${lightdm-mobile-greeter}/share/xgreeters/lightdm-mobile-greeter.desktop";
48     name = "lightdm-mobile-greeter.desktop";
49   }];
51   meta = with lib; {
52     description = "A simple log in screen for use on touch screens";
53     homepage = "https://git.raatty.club/raatty/lightdm-mobile-greeter";
54     maintainers = with maintainers; [ colinsane ];
55     platforms = platforms.linux;
56     license = licenses.mit;
57   };