From 582ed32c9e9187d153c1e8e8087db7230d506c20 Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Thu, 28 Mar 2024 14:09:10 +0100 Subject: [PATCH] update tooling --- flake.lock | 6 +++--- flake.nix | 2 +- nix/default.nix | 47 ----------------------------------------------- nix/package.nix | 31 +++++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 51 deletions(-) delete mode 100644 nix/default.nix create mode 100644 nix/package.nix diff --git a/flake.lock b/flake.lock index cc34a11..a92c561 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1711370797, - "narHash": "sha256-2xu0jVSjuKhN97dqc4bVtvEH52Rwh6+uyI1XCnzoUyI=", + "lastModified": 1711593151, + "narHash": "sha256-/9NCoPI7fqJIN8viONsY9X0fAeq8jc3GslFCO0ky6TQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c726225724e681b3626acc941c6f95d2b0602087", + "rev": "bb2b73df7bcfbd2dd55ff39b944d70547d53c267", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4d3cd20..e71d1fb 100644 --- a/flake.nix +++ b/flake.nix @@ -44,7 +44,7 @@ in pkgs.alejandra); packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; - swaymux-pkg = (pkgs.qt6Packages.callPackage ./nix/default.nix {}); + swaymux-pkg = (pkgs.qt6Packages.callPackage ./nix/package.nix {}); in { swaymux = swaymux-pkg; default = swaymux-pkg; diff --git a/nix/default.nix b/nix/default.nix deleted file mode 100644 index 74f9c87..0000000 --- a/nix/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - nlohmann_json, - cmake, - qt6, - qtbase, - qtwayland, - stdenv, - wrapQtAppsHook -}: -stdenv.mkDerivation { - pname = "swaymux"; - version = "0.1"; - - src = lib.cleanSource ../.; - - configurePhase = '' - cmake . - ''; - - buildPhase = '' - make -j - ''; - - installPhase = '' - mkdir -p $out/bin - mv swaymux $out/bin - ''; - - # dontWrapQtApps = true; - buildInputs = [ qt6.qtwayland cmake nlohmann_json qtbase]; - nativeBuildInputs = [ qt6.wrapQtAppsHook ]; - - doCheck = true; - - meta = with lib; { - description = "A program to quickly navigate sway"; - longDescription = '' - Swaymux allows the user to quickly navigate and administrate outputs, workspaces and containers in a tmux-style approach. - ''; - homepage = "https://git.grimmauld.de/Grimmauld/swaymux"; - changelog = "https://git.grimmauld.de/Grimmauld/swaymux/commits/branch/main"; - license = lib.licenses.bsd3; - maintainers = [ maintainers.grimmauld ]; - platforms = platforms.linux; - }; -} diff --git a/nix/package.nix b/nix/package.nix new file mode 100644 index 0000000..9640947 --- /dev/null +++ b/nix/package.nix @@ -0,0 +1,31 @@ +{ cmake +, fetchFromGitea +, lib +, nlohmann_json +, qt6 +, stdenv +}: +stdenv.mkDerivation (finalAttrs: { + version = "1.0"; + pname = "swaymux"; + + src = lib.cleanSource ../.; + + buildInputs = [ qt6.qtwayland nlohmann_json qt6.qtbase]; + nativeBuildInputs = [ cmake qt6.wrapQtAppsHook ]; + + doCheck = true; + + meta = with lib; { + changelog = "https://git.grimmauld.de/Grimmauld/swaymux/commits/branch/main"; + description = "A program to quickly navigate sway"; + homepage = "https://git.grimmauld.de/Grimmauld/swaymux"; + license = licenses.bsd3; + longDescription = '' + Swaymux allows the user to quickly navigate and administrate outputs, workspaces and containers in a tmux-style approach. + ''; + mainProgram = "swaymux"; + maintainers = with maintainers; [ grimmauld ]; + platforms = platforms.linux; + }; +})