52 lines
1.7 KiB
Nix
52 lines
1.7 KiB
Nix
{
|
|
description = "A simple log in screen for use on touch screens.";
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-22.05";
|
|
flake-utils.url = github:numtide/flake-utils;
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
with flake-utils.lib; eachSystem allSystems (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
buildInputs = with pkgs; [ gtk3 libhandy_0 lightdm ];
|
|
nativeBuildInputs = with pkgs; [ ];
|
|
in
|
|
rec {
|
|
packages = {
|
|
# docs: <nixpkgs>/doc/languages-frameworks/rust.section.md
|
|
# docs: https://github.com/oxalica/rust-overlay
|
|
lightdm-mobile-greeter = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "lightdm-mobile-greeter";
|
|
version = "0.1.1";
|
|
|
|
src = ./.;
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"light-dm-sys-0.0.1" = "sha256-5o/DZqP6j6xRwf+YmrtQTpcg4PhTvQ0hKC1WauLdqzc=";
|
|
};
|
|
};
|
|
|
|
inherit buildInputs nativeBuildInputs;
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/applications
|
|
substitute lightdm-mobile-greeter.desktop \
|
|
$out/share/applications/lightdm-mobile-greeter.desktop \
|
|
--replace lightdm-mobile-greeter $out/bin/lightdm-mobile-greeter
|
|
'';
|
|
};
|
|
};
|
|
defaultPackage = packages.lightdm-mobile-greeter;
|
|
|
|
devShells.default = with pkgs; mkShell {
|
|
# Allow cargo to download crates.
|
|
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
|
|
|
# include both build and runtime deps in the shell so once can build and run the result.
|
|
buildInputs = buildInputs ++ nativeBuildInputs ++ [ cargo ];
|
|
};
|
|
});
|
|
}
|