From 1188ea50cab4aae64be1ee68bff2fc0d5c32650f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Mon, 26 Aug 2024 14:17:30 +0200 Subject: [PATCH] initial commit: moved out of nix repository --- flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..bf51175 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1722869614, + "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6515abb --- /dev/null +++ b/flake.nix @@ -0,0 +1,53 @@ +{ + description = "A small utility for the river Wayland compositor to rotate the focused tags."; + inputs = { + nixpkgs.url = "nixpkgs/nixos-24.05"; + }; + outputs = { nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + dependencies = with pkgs; [ + pkg-config + pixman + wayland + wayland-scanner + ]; + version = "0.2.2"; + in + { + packages.${system}.default = pkgs.stdenv.mkDerivation { + pname = "river-shifttags"; + inherit version; + + src = pkgs.fetchFromGitLab { + owner = "logistic-bot"; + repo = "river-shifttags"; + rev = "1cb09ab24dc5fd08453bbbb03982a9e544c36eae"; + hash = "sha256-Fvp7VucysYjoMq3hbeIQF6PeyBveHw2y+AsTLAy2fYw="; + }; + + outputs = [ "out" "man" ]; + + nativeBuildInputs = dependencies; + + installPhase = '' + mkdir -p $out/usr/local/bin + mkdir -p $man/share/man + install -Dm 755 -t "$out/bin" ./river-shifttags + install -Dm 644 -t "$man/share/man/man1" ./river-shifttags.1 + ''; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/river-shifttags --help + ''; + }; + devShells.${system}.default = pkgs.mkShell { + packages = dependencies ++ [ + pkgs.gdb + ]; + shellHook = "exec zsh"; + }; + }; +}