nixpkgs/pkgs/by-name/li/lightdm-mobile-greeter/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

60 lines
1.5 KiB
Nix

{ lib
, fetchFromGitea
, gtk3
, libhandy_0
, lightdm
, lightdm-mobile-greeter
, linkFarm
, pkg-config
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "lightdm-mobile-greeter";
version = "2022-10-30";
src = fetchFromGitea {
domain = "git.raatty.club";
owner = "raatty";
repo = "lightdm-mobile-greeter";
rev = "8c8d6dfce62799307320c8c5a1f0dd5c8c18e4d3";
hash = "sha256-SrAR2+An3BN/doFl/s8PcYZMUHLfVPXKZOo6ndO60nY=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"light-dm-sys-0.0.1" = "sha256-91MZhbO/Or0QOt0yVAUhtorpMBBzElFg6U59mF7WB0k=";
};
};
buildInputs = [
gtk3
libhandy_0
lightdm
];
nativeBuildInputs = [
pkg-config
];
postInstall = ''
mkdir -p $out/share/xgreeters
substitute lightdm-mobile-greeter.desktop \
$out/share/xgreeters/lightdm-mobile-greeter.desktop \
--replace lightdm-mobile-greeter $out/bin/lightdm-mobile-greeter
'';
passthru.xgreeters = linkFarm "lightdm-mobile-greeter-xgreeters" [{
path = "${lightdm-mobile-greeter}/share/xgreeters/lightdm-mobile-greeter.desktop";
name = "lightdm-mobile-greeter.desktop";
}];
meta = with lib; {
description = "Simple log in screen for use on touch screens";
homepage = "https://git.raatty.club/raatty/lightdm-mobile-greeter";
maintainers = with maintainers; [ colinsane ];
platforms = platforms.linux;
license = licenses.mit;
mainProgram = "lightdm-mobile-greeter";
};
}