about summary refs log tree commit diff
path: root/pkgs/by-name/sn
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2023-12-18 13:55:01 +0100
committerGitHub <noreply@github.com>2023-12-18 13:55:01 +0100
commitd389a1988307793ebd0d4ad13b66c8df416fada6 (patch)
tree0ac6d61eee6512a88a6c8208076d992108499cc5 /pkgs/by-name/sn
parent886c9aee6ca9324e127f9c2c4e6f68c2641c8256 (diff)
parente476dfaab3561ed663f43db81394c04107eeb182 (diff)
Merge pull request #269750 from ianmjones/snippetexpander-1.0.1
snippetexpander: init at 1.0.1
Diffstat (limited to 'pkgs/by-name/sn')
-rw-r--r--pkgs/by-name/sn/snippetexpander/package.nix47
-rw-r--r--pkgs/by-name/sn/snippetexpanderd/package.nix63
-rw-r--r--pkgs/by-name/sn/snippetexpandergui/package.nix70
-rw-r--r--pkgs/by-name/sn/snippetexpanderx/package.nix64
4 files changed, 244 insertions, 0 deletions
diff --git a/pkgs/by-name/sn/snippetexpander/package.nix b/pkgs/by-name/sn/snippetexpander/package.nix
new file mode 100644
index 0000000000000..1f5f3a954ec03
--- /dev/null
+++ b/pkgs/by-name/sn/snippetexpander/package.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildGoModule
+, fetchFromSourcehut
+, scdoc
+, installShellFiles
+, snippetexpanderd
+}:
+
+buildGoModule rec {
+  inherit (snippetexpanderd) src version;
+
+  pname = "snippetexpander";
+
+  vendorHash = "sha256-wSAho59yxcXTu1zQ5x783HT4gtfSM4GdsOEeC1wfHhE=";
+
+  proxyVendor = true;
+
+  modRoot = "cmd/snippetexpander";
+
+  nativeBuildInputs = [
+    scdoc
+    installShellFiles
+  ];
+
+  buildInputs = [
+    snippetexpanderd
+  ];
+
+  ldflags = [
+    "-s"
+    "-w"
+  ];
+
+  postInstall = ''
+    make man
+    installManPage snippetexpander.1
+  '';
+
+  meta = with lib; {
+    description = "Your little expandable text snippet helper CLI";
+    homepage = "https://snippetexpander.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ianmjones ];
+    platforms = platforms.linux;
+    mainProgram = "snippetexpander";
+  };
+}
diff --git a/pkgs/by-name/sn/snippetexpanderd/package.nix b/pkgs/by-name/sn/snippetexpanderd/package.nix
new file mode 100644
index 0000000000000..308803ad9eec4
--- /dev/null
+++ b/pkgs/by-name/sn/snippetexpanderd/package.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, buildGoModule
+, fetchFromSourcehut
+, pkg-config
+, makeWrapper
+, scdoc
+, installShellFiles
+, xorg
+, gtk3
+}:
+
+buildGoModule rec {
+  pname = "snippetexpanderd";
+  version = "1.0.1";
+
+  src = fetchFromSourcehut {
+    owner = "~ianmjones";
+    repo = "snippetexpander";
+    rev = "v${version}";
+    hash = "sha256-y3TJ+L3kXYfZFzAD1vmhvP6Yarctu5LHq/74005h8sI=";
+  };
+
+  vendorHash = "sha256-QX8HI8I1ZJI6HJ1sl86OiJ4nxwFAjHH8h1zB9ASJaQs=";
+
+  modRoot = "cmd/snippetexpanderd";
+
+  nativeBuildInputs = [
+    pkg-config
+    makeWrapper
+    scdoc
+    installShellFiles
+  ];
+
+  buildInputs = [
+    xorg.libX11
+    gtk3
+  ];
+
+  ldflags = [
+    "-s"
+    "-w"
+  ];
+
+  postInstall = ''
+    make man
+    installManPage snippetexpanderd.1 snippetexpander-placeholders.5
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/snippetexpanderd \
+      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]}
+  '';
+
+  meta = with lib; {
+    description = "Your little expandable text snippet helper daemon";
+    homepage = "https://snippetexpander.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ianmjones ];
+    platforms = platforms.linux;
+    mainProgram = "snippetexpanderd";
+  };
+}
diff --git a/pkgs/by-name/sn/snippetexpandergui/package.nix b/pkgs/by-name/sn/snippetexpandergui/package.nix
new file mode 100644
index 0000000000000..1ce5f5d9cbe5e
--- /dev/null
+++ b/pkgs/by-name/sn/snippetexpandergui/package.nix
@@ -0,0 +1,70 @@
+{ lib
+, buildGoModule
+, fetchFromSourcehut
+, makeWrapper
+, wails
+, scdoc
+, installShellFiles
+, xorg
+, gtk3
+, webkitgtk
+, gsettings-desktop-schemas
+, snippetexpanderd
+}:
+
+buildGoModule rec {
+  inherit (snippetexpanderd) src version;
+
+  pname = "snippetexpandergui";
+
+  vendorHash = "sha256-iZfZdT8KlfZMVLQcYmo6EooIdsSGrpO/ojwT9Ft1GQI=";
+
+  proxyVendor = true;
+
+  modRoot = "cmd/snippetexpandergui";
+
+  nativeBuildInputs = [
+    makeWrapper
+    wails
+    scdoc
+    installShellFiles
+  ];
+
+  buildInputs = [
+    xorg.libX11
+    gtk3
+    webkitgtk
+    gsettings-desktop-schemas
+    snippetexpanderd
+  ];
+
+  ldflags = [
+    "-s"
+    "-w"
+  ];
+
+  tags = [
+    "desktop"
+    "production"
+  ];
+
+  postInstall = ''
+    mv build/linux/share $out/share
+    make man
+    installManPage snippetexpandergui.1
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/snippetexpandergui \
+      --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}
+  '';
+
+  meta = with lib; {
+    description = "Your little expandable text snippet helper GUI";
+    homepage = "https://snippetexpander.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ianmjones ];
+    platforms = platforms.linux;
+    mainProgram = "snippetexpandergui";
+  };
+}
diff --git a/pkgs/by-name/sn/snippetexpanderx/package.nix b/pkgs/by-name/sn/snippetexpanderx/package.nix
new file mode 100644
index 0000000000000..3c91adbbbc0c8
--- /dev/null
+++ b/pkgs/by-name/sn/snippetexpanderx/package.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromSourcehut
+, pkg-config
+, vala
+, wrapGAppsHook
+, installShellFiles
+, scdoc
+, at-spi2-atk
+, at-spi2-core
+, dbus
+, gtk3
+, ibus
+, libgee
+, xorg
+, snippetexpanderd
+}:
+
+stdenv.mkDerivation rec {
+  inherit (snippetexpanderd) src version;
+
+  pname = "snippetexpanderx";
+
+  sourceRoot = "source/cmd/snippetexpanderx";
+
+  nativeBuildInputs = [
+    pkg-config
+    vala
+    wrapGAppsHook
+    installShellFiles
+    scdoc
+  ];
+
+  buildInputs = [
+    at-spi2-atk
+    at-spi2-core
+    dbus
+    gtk3
+    ibus
+    libgee
+    xorg.libX11
+    snippetexpanderd
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    install -m555 snippetexpanderx $out/bin/
+    installManPage snippetexpanderx.1
+    runHook postInstall
+  '';
+
+  # There are no tests.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Your little expandable text snippet helper auto expander daemon";
+    homepage = "https://snippetexpander.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ianmjones ];
+    platforms = platforms.linux;
+    mainProgram = "snippetexpanderx";
+  };
+}