Fork of https://github.com/lelgenio/wl-crosshair - A crosshair overlay for wlroots compositor
at main 1.4 kB view raw
1{ 2 description = "A crosshair overlay for wlroots compositor"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 6 flake-utils.url = "github:numtide/flake-utils"; 7 }; 8 9 outputs = { self, nixpkgs, flake-utils, ... }: 10 flake-utils.lib.eachDefaultSystem (system: 11 let 12 pkgs = import nixpkgs { inherit system; }; 13 in 14 { 15 packages = { 16 default = self.packages.${system}.wl-crosshair; 17 wl-crosshair = pkgs.rustPlatform.buildRustPackage { 18 pname = "wl-crosshair"; 19 version = "0.1.0"; 20 src = ./.; 21 cargoLock.lockFile = ./Cargo.lock; 22 nativeBuildInputs = with pkgs; [ makeWrapper ]; 23 postInstall = '' 24 mkdir -p $out/share 25 cp -rv ${./cursors} $out/share/cursors 26 wrapProgram $out/bin/* \ 27 --set WL_CROSSHAIR_IMAGE_PATH $out/share/cursors/inverse-v.png 28 ''; 29 }; 30 }; 31 32 apps = { 33 default = self.apps.${system}.wl-crosshair; 34 wl-crosshair = flake-utils.lib.mkApp { 35 drv = self.packages.${system}.default; 36 }; 37 }; 38 39 devShells.default = pkgs.mkShell { 40 nativeBuildInputs = with pkgs; [ 41 cargo 42 rustc 43 rustfmt 44 ]; 45 }; 46 }); 47}