diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/by-name/sh/shadershark/package.nix | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/sh/shadershark/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/sh/shadershark/package.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/sh/shadershark/package.nix b/nixpkgs/pkgs/by-name/sh/shadershark/package.nix new file mode 100644 index 000000000000..e27036575be7 --- /dev/null +++ b/nixpkgs/pkgs/by-name/sh/shadershark/package.nix @@ -0,0 +1,63 @@ +{ stdenv +, lib +, fetchhg +, libepoxy +, xorg +, libGLU +, glm +, pkg-config +, imagemagick +, makeWrapper +, installShellFiles +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "shadershark"; + version = "0.1"; + + src = fetchhg { + url = "https://hg.globalcode.info/graphics/shader-shark"; + rev = "v${finalAttrs.version}"; + hash = "sha256-AYZWfqMckPKgXNIX9kAAv1mvD3opLi5EUElFsigiF3c="; + }; + + nativeBuildInputs = [ + pkg-config + makeWrapper + installShellFiles + ]; + + buildInputs = [ + libepoxy + xorg.libX11 + libGLU + glm + imagemagick + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,share/shadershark} + + install -m755 -D build/shader-shark $out/bin + cp -r shaders textures $out/share/shadershark + + wrapProgram $out/bin/shader-shark \ + --set SHADER_SHARK_DATA_DIR $out/share/shadershark + + installShellCompletion --bash --name shader-shark.bash bash-completion.sh + + runHook postInstall + ''; + + passthru.updateScript = [ ./update.sh finalAttrs.src.url ]; + + meta = with lib; { + mainProgram = "shader-shark"; + description = "OpenGL/X11 application for GNU/Linux consisting of a single window that shows simple 3D scene of a textured rectangle with applied vertex and fragment shaders (GLSL)"; + homepage = "https://graphics.globalcode.info/v_0/shader-shark.xhtml"; + license = licenses.gpl3; + maintainers = [ maintainers.lucasew ]; + platforms = platforms.linux; + }; +}) |