4 Commits

Author SHA1 Message Date
175e47aca5 release: 0.1.1
i'm bumping the version in order to synchronize git tags (v0.1.1)
with the Cargo.toml version, which makes OS-level packaging a bit more
sensible.
2022-10-20 03:25:09 -07:00
3428668049 nix: package the desktop file 2022-10-20 02:56:50 -07:00
93f34bac63 add a flake.nix for Nix builds
build with `nix build`; enter a dev environment with `nix develop`
wherein you can `cargo build`.
2022-10-20 02:01:14 -07:00
7817439629 point lightdm-rs dependency to git.uninsane.org 2022-10-19 08:01:47 -07:00
4 changed files with 101 additions and 6 deletions

8
Cargo.lock generated
View File

@@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "atk"
version = "0.8.0"
@@ -362,7 +364,7 @@ dependencies = [
[[package]]
name = "light-dm-sys"
version = "0.0.1"
source = "git+https://raatty.club:3000/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11"
source = "git+https://git.uninsane.org/colin/lightdm-rs.git#4323e3244dff086a8120bfd93240cb9c28a308c8"
dependencies = [
"gio-sys",
"glib-sys",
@@ -374,7 +376,7 @@ dependencies = [
[[package]]
name = "lightdm"
version = "0.1.0"
source = "git+https://raatty.club:3000/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11"
source = "git+https://git.uninsane.org/colin/lightdm-rs.git#4323e3244dff086a8120bfd93240cb9c28a308c8"
dependencies = [
"gio",
"gio-sys",
@@ -388,7 +390,7 @@ dependencies = [
[[package]]
name = "lightdm-mobile-greeter"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"gdk",
"gtk",

View File

@@ -1,7 +1,7 @@
[package]
name = "lightdm-mobile-greeter"
version = "0.1.0"
authors = ["Raatty <me@raatty.club>"]
version = "0.1.1"
authors = ["Raatty <me@raatty.club>", "Colin <colin@uninsane.org>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -9,7 +9,7 @@ edition = "2018"
libhandy = "0.5.0"
gdk = "0.12.1"
gtk = "0.8.1"
lightdm = { git = "https://git.raatty.club/raatty/lightdm-rs.git"}
lightdm = { git = "https://git.uninsane.org/colin/lightdm-rs.git"}
[profile.release]
panic = "abort"

42
flake.lock generated Normal file
View File

@@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1666164185,
"narHash": "sha256-5v+YB4ijeUfg5LCz9ck4gIpCPhIS+qn02OyPJO48bCE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c5203abb1329f7ea084c04acda330ca75d5b9fb5",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

51
flake.nix Normal file
View File

@@ -0,0 +1,51 @@
{
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 ];
};
});
}