This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
buildGoModule, | ||
nix-filter, | ||
lib, | ||
... | ||
}: | ||
buildGoModule { | ||
pname = "Hyprkeys"; | ||
version = "1.0.2"; | ||
src = nix-filter.lib { | ||
root = ./.; | ||
exclude = [ | ||
./README.md | ||
./out.md | ||
./out.json | ||
./.github | ||
]; | ||
}; | ||
|
||
ldflags = ["-s" "-w"]; | ||
vendorHash = "sha256-JFvC9V0xS8SZSdLsOtpyTrFzXjYAOaPQaJHdcnJzK3s="; | ||
|
||
doCheck = true; | ||
|
||
preFixup = '' | ||
mkdir -p completions | ||
$out/bin/hyprkeys completions zsh > completions/hyprkeys.zsh | ||
$out/bin/hyprkeys completions bash > completions/hyprkeys.bash | ||
$out/bin/hyprkeys completions fish > completions/hyprkeys.fish | ||
installShellCompletion completions/* | ||
''; | ||
|
||
meta = with lib; { | ||
description = "A simple, scriptable keybind retrieval utility for Hyprland."; | ||
homepage = "/~https://github.com/hyprland-community/Hyprkeys"; | ||
maintainers = with maintainers; [NotAShelf]; | ||
mainProgram = "hyprkeys"; | ||
platforms = ["x86_64-linux" "aarch64-linux"]; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
{ | ||
description = "Hyprkeys, a config inspection utility for Hyprland"; | ||
|
||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
inputs.gomod2nix.url = "github:nix-community/gomod2nix"; | ||
description = "Hyprkeys - a keybind inspection utility for Hyprland"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
nix-filter.url = "github:numtide/nix-filter"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
gomod2nix, | ||
}: ( | ||
flake-utils.lib.eachDefaultSystem | ||
(system: let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [gomod2nix.overlays.default]; | ||
nix-filter, | ||
}: let | ||
systems = ["x86_64-linux" "aarch64-linux"]; # we assume Hyprland only works on those two, for now | ||
forEachSystem = nixpkgs.lib.genAttrs systems; | ||
|
||
pkgsForEach = nixpkgs.legacyPackages; | ||
in { | ||
packages = forEachSystem (system: rec { | ||
hyprkeys = pkgsForEach.${system}.callPackage ./default.nix {inherit nix-filter;}; | ||
default = hyprkeys; | ||
}); | ||
|
||
devShells = forEachSystem (system: { | ||
default = pkgsForEach.${system}.mkShell { | ||
name = "hyprkeys-dev"; | ||
packages = with pkgsForEach.${system}; [go]; | ||
}; | ||
in { | ||
packages.default = pkgs.callPackage ./nix {}; | ||
devShells.default = import ./nix/shell.nix {inherit pkgs;}; | ||
}) | ||
); | ||
}); | ||
|
||
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.alejandra); | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.