about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ns
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/ns')
-rw-r--r--nixpkgs/pkgs/by-name/ns/nsf-ordlista/package.nix27
-rw-r--r--nixpkgs/pkgs/by-name/ns/nsplist/package.nix35
-rw-r--r--nixpkgs/pkgs/by-name/ns/nsxiv/package.nix70
3 files changed, 132 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/ns/nsf-ordlista/package.nix b/nixpkgs/pkgs/by-name/ns/nsf-ordlista/package.nix
new file mode 100644
index 000000000000..d3ec535c44e8
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/ns/nsf-ordlista/package.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenvNoCC
+, fetchzip
+}:
+stdenvNoCC.mkDerivation {
+  pname = "nsf-ordlista";
+  version = "unstable-2023-08-20";
+  src = fetchzip {
+    url = "http://www2.scrabbleforbundet.no/wp-content/uploads/2023/08/nsf2023.zip";
+    hash = "sha256-bcVqZ2yPHurl6sRNgeLNAyyR8WR9ewmtn85Xuw/rZ3s=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm444 nsf2023.txt $out/share/wordlists/nsf.txt
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Wordlist from the Norwegian Scrabble Federation";
+    homepage = "https://www2.scrabbleforbundet.no/";
+    downloadPage = "https://www2.scrabbleforbundet.no/?p=4881#more-4881";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ h7x4 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/ns/nsplist/package.nix b/nixpkgs/pkgs/by-name/ns/nsplist/package.nix
new file mode 100644
index 000000000000..92495409f65a
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/ns/nsplist/package.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, flex
+}:
+
+stdenv.mkDerivation {
+  pname = "nsplist";
+  version = "0-unstable-2017-04-11";
+
+  src = fetchFromGitHub {
+    owner = "matthewbauer";
+    repo = "NSPlist";
+    rev = "713decf06c1ef6c39a707bc99eb45ac9925f2b8a";
+    hash = "sha256-mRyuElLTlOZuUlQ3dKZJbclPq73Gv+YFrBCB5nh0nmw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    flex
+  ];
+
+  preConfigure = ''
+    # Regenerate the lexer for improved compatibility with clang 16.
+    flex -o src/NSPlistLexer.cpp <(tail --lines=+17 src/NSPlistLexer.l)
+  '';
+
+  meta = with lib; {
+    maintainers = with maintainers; [ matthewbauer ];
+    description = "Parses .plist files";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix b/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix
new file mode 100644
index 000000000000..ba267571a900
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, giflib
+, imlib2
+, libXft
+, libexif
+, libwebp
+, libinotify-kqueue
+, conf ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "nsxiv";
+  version = "32";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "nsxiv";
+    repo = "nsxiv";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-UWaet7hVtgfuWTiNY4VcsMWTfS6L9r5w1fb/0dWz8SI=";
+  };
+
+  outputs = [ "out" "man" "doc" ];
+
+  buildInputs = [
+    giflib
+    imlib2
+    libXft
+    libexif
+    libwebp
+  ] ++ lib.optional stdenv.isDarwin libinotify-kqueue;
+
+  postPatch = lib.optionalString (conf != null) ''
+    cp ${(builtins.toFile "config.def.h" conf)} config.def.h
+  '';
+
+  env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify";
+
+  makeFlags = [ "CC:=$(CC)" ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  installTargets = [ "install-all" ];
+
+  meta = {
+    homepage = "https://nsxiv.codeberg.page/";
+    description = "New Suckless X Image Viewer";
+    mainProgram = "nsxiv";
+    longDescription = ''
+      nsxiv is a fork of now unmaintained sxiv with the purpose of being a
+      drop-in replacement of sxiv, maintaining it and adding simple, sensible
+      features, like:
+
+      - Basic image operations, e.g. zooming, panning, rotating
+      - Customizable key and mouse button mappings (in config.h)
+      - Script-ability via key-handler
+      - Thumbnail mode: grid of selectable previews of all images
+      - Ability to cache thumbnails for fast re-loading
+      - Basic support for animated/multi-frame images (GIF/WebP)
+      - Display image information in status bar
+      - Display image name/path in X title
+    '';
+    changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ AndersonTorres sikmir ];
+    platforms = lib.platforms.unix;
+  };
+})