Merge pull request #274841 from r-ryantm/auto-update/miniaudio
[NixPkgs.git] / pkgs / applications / display-managers / lightdm / default.nix
blob8365ac3b5a22f048c788600401ca53259401daaf
1 { lib, stdenv
2 , buildPackages
3 , fetchFromGitHub
4 , nix-update-script
5 , substituteAll
6 , plymouth
7 , pam
8 , pkg-config
9 , autoconf
10 , automake
11 , libtool
12 , libxcb
13 , glib
14 , libXdmcp
15 , itstool
16 , intltool
17 , libxklavier
18 , libgcrypt
19 , audit
20 , busybox
21 , polkit
22 , accountsservice
23 , gtk-doc
24 , gnome
25 , gobject-introspection
26 , vala
27 , fetchpatch
28 , withQt5 ? false
29 , qtbase
30 , yelp-tools
33 stdenv.mkDerivation rec {
34   pname = "lightdm";
35   version = "1.32.0";
37   outputs = [ "out" "dev" ];
39   src = fetchFromGitHub {
40     owner = "canonical";
41     repo = pname;
42     rev = version;
43     sha256 = "sha256-ttNlhWD0Ran4d3QvZ+PxbFbSUGMkfrRm+hJdQxIDJvM=";
44   };
46   nativeBuildInputs = [
47     autoconf
48     automake
49     yelp-tools
50     gnome.yelp-xsl
51     gobject-introspection
52     gtk-doc
53     intltool
54     itstool
55     libtool
56     pkg-config
57     vala
58   ];
60   buildInputs = [
61     accountsservice
62     audit
63     glib
64     libXdmcp
65     libgcrypt
66     libxcb
67     libxklavier
68     pam
69     polkit
70   ] ++ lib.optional withQt5 qtbase;
72   patches = [
73     # Adds option to disable writing dmrc files
74     (fetchpatch {
75       url = "https://src.fedoraproject.org/rpms/lightdm/raw/4cf0d2bed8d1c68970b0322ccd5dbbbb7a0b12bc/f/lightdm-1.25.1-disable_dmrc.patch";
76       sha256 = "06f7iabagrsiws2l75sx2jyljknr9js7ydn151p3qfi104d1541n";
77     })
79     # Hardcode plymouth to fix transitions.
80     # For some reason it can't find `plymouth`
81     # even when it's in PATH in environment.systemPackages.
82     (substituteAll {
83       src = ./fix-paths.patch;
84       plymouth = "${plymouth}/bin/plymouth";
85     })
86   ];
88   dontWrapQtApps = true;
90   preConfigure = "NOCONFIGURE=1 ./autogen.sh";
92   configureFlags = [
93     "--localstatedir=/var"
94     "--sysconfdir=/etc"
95     "--disable-tests"
96     "--disable-dmrc"
97   ] ++ lib.optional withQt5 "--enable-liblightdm-qt5";
99   installFlags = [
100     "sysconfdir=${placeholder "out"}/etc"
101     "localstatedir=\${TMPDIR}"
102   ];
104   prePatch = ''
105     substituteInPlace autogen.sh \
106       --replace "which" "${buildPackages.busybox}/bin/which"
108     substituteInPlace src/shared-data-manager.c \
109       --replace /bin/rm ${busybox}/bin/rm
110   '';
112   postInstall = ''
113     rm -rf $out/etc/apparmor.d $out/etc/init $out/etc/pam.d
114   '';
116   passthru = {
117     updateScript = nix-update-script { };
118   };
121   meta = with lib; {
122     homepage = "https://github.com/canonical/lightdm";
123     description = "A cross-desktop display manager";
124     platforms = platforms.linux;
125     license = licenses.gpl3;
126     maintainers = with maintainers; [ ] ++ teams.pantheon.members;
127   };