From c352a7cb162b1c6df6f611e5a26d9aebbb329eb8 Mon Sep 17 00:00:00 2001 From: Jory Severijnse Date: Thu, 26 Mar 2026 17:29:03 +0100 Subject: [PATCH] Use flake.nix instead --- default.nix | 25 ------------------------- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++++-- 3 files changed, 51 insertions(+), 27 deletions(-) delete mode 100644 default.nix create mode 100644 flake.lock diff --git a/default.nix b/default.nix deleted file mode 100644 index 44c867a..0000000 --- a/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs ? import {} }: - -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 - ]; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..246cfd4 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix index 9f7513d..af23efb 100644 --- a/flake.nix +++ b/flake.nix @@ -6,9 +6,31 @@ }; outputs = { self, nixpkgs }: let - system = builtins.currentSystem; + system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { - packages.${system}.rustlock = pkgs.callPackage ./default.nix {}; + 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 + ]; + }; }; } \ No newline at end of file