From e2fc80cdab659cb9eab39d596eae750ce3f7edd7 Mon Sep 17 00:00:00 2001 From: mat ess Date: Sun, 17 Jul 2022 13:24:35 -0400 Subject: [PATCH] Add local gurk --- flake.lock | 24 ++++++++++++------------ flake.nix | 3 ++- pkgs/gurk-rs.nix | 30 ++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 pkgs/gurk-rs.nix diff --git a/flake.lock b/flake.lock index 993cff1..f723d57 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1651916036, - "narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=", + "lastModified": 1657835815, + "narHash": "sha256-CnZszAYpNKydh6N7+xg+eRtWNVoAAGqc6bg+Lpgq1xc=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba", + "rev": "54a24f042f93c79f5679f133faddedec61955cf2", "type": "github" }, "original": { @@ -76,11 +76,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1657396086, - "narHash": "sha256-4cQ6hEuewWoFkTBlu211JGxPQQ1Zyli8oEq1cu7cVeA=", + "lastModified": 1657887110, + "narHash": "sha256-8VV0/kZed2z8fGtEc2zr+WLxTow+JTIlMjnSisyv0GQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "c645cc9f82c7753450d1fa4d1bc73b64960a9d7a", + "rev": "4c5106ed0f3168ff2df21b646aef67e86cbfc11c", "type": "github" }, "original": { @@ -107,11 +107,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1657491355, - "narHash": "sha256-VQUKwiEiRMwGc2jVCH10zigyxO3LoCLYwG58y7pXSd8=", + "lastModified": 1658075259, + "narHash": "sha256-MJR7YRmWRJGA2PhG63kTxd7GmE5YvM3AhdN1YDyJ8jM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9130ba39bf9f09b2775aad001b63f323801b6890", + "rev": "c490f57e189fdb4f19d4eb9c930caf0c3afa28e1", "type": "github" }, "original": { @@ -123,11 +123,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1657413868, - "narHash": "sha256-qDC9kUZhGhoDtOzhd6kIMUQHRZNys6/xsJAWrJB+gqU=", + "lastModified": 1657975505, + "narHash": "sha256-juMbw+GY2ycTrg3QbdFfEQs6P3FJeoYEv8aMVl2EZsg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7802f1b6479d6f04bea5cc94e8290ea61e210ecf", + "rev": "d6df226c53d46821bd4773bd7ec3375f30238edb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index bb3b99e..69490f9 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ let inherit (darwin.lib) darwinSystem; - inherit (inputs.nixpkgs-unstable.lib) attrValues makeOverridable optionalAttrs singleton; + inherit (inputs.nixpkgs-unstable.lib) attrValues makeOverridable optional optionalAttrs singleton; # Configuration for `nixpkgs` nixpkgsConfig = { @@ -36,6 +36,7 @@ final: prev: { dark-mode-notify = final.callPackage ./pkgs/dark-mode-notify.nix { inherit (inputs) dark-mode-notify-src; }; + gurk-rs = final.callPackage ./pkgs/gurk-rs.nix { }; } // optionalAttrs (prev.stdenv.system == "aarch64-darwin") { diff --git a/pkgs/gurk-rs.nix b/pkgs/gurk-rs.nix new file mode 100644 index 0000000..545008c --- /dev/null +++ b/pkgs/gurk-rs.nix @@ -0,0 +1,30 @@ +{ stdenv +, lib +, protobuf +, rustPlatform +, fetchFromGitHub +}: + +rustPlatform.buildRustPackage rec { + pname = "gurk-rs"; + version = "0.2.4"; + + src = fetchFromGitHub { + owner = "boxdot"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-WZUoUvu7GaiBOaRAOGRCXrLe6u3DRbI6CDTAf5jryGc="; + }; + + cargoHash = "sha256-81ZW61JX40W0D/cmYogR3RJH2dvEKW1K7sIsl2io/7E="; + buildInputs = [ protobuf ]; + + PROTOC = "${protobuf}/bin/protoc"; + + meta = with lib; { + description = "Signal Messenger client for terminal"; + homepage = "https://github.com/boxdot/gurk-rs"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ devhell ]; + }; +}