Compare commits

...

2 Commits

Author SHA1 Message Date
jory c352a7cb16 Use flake.nix instead
Code Quality / quality-checks (push) Has been cancelled
2026-03-26 17:29:03 +01:00
jory 1cc69bcc61 Add flake.nix for easy building 2026-03-26 15:45:38 +01:00
3 changed files with 63 additions and 25 deletions
-25
View File
@@ -1,25 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.rustPlatform.buildRustPackage {
pname = "rustlock";
version = "0.1.0";
src = ./.;
cargoLock = { lockFile = ./Cargo.lock; };
buildInputs = with pkgs; [
cairo
pam
gdk-pixbuf
librsvg
pango
libxkbcommon
dbus
];
nativeBuildInputs = [
pkgs.pkg-config
pkgs.rustPlatform.bindgenHook
pkgs.rustfmt
pkgs.clippy
];
}
Generated
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1774386573,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+36
View File
@@ -0,0 +1,36 @@
{
description = "A high-performance Wayland screen locker written in Rust";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
packages.${system}.default = pkgs.rustPlatform.buildRustPackage {
pname = "rustlock";
version = "0.1.0";
src = ./.;
cargoLock = { lockFile = ./Cargo.lock; };
buildInputs = with pkgs; [
cairo
pam
gdk-pixbuf
librsvg
pango
libxkbcommon
dbus
];
nativeBuildInputs = [
pkgs.pkg-config
pkgs.rustPlatform.bindgenHook
pkgs.rustfmt
pkgs.clippy
];
};
};
}