about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/by-name/co/cowsql/package.nix34
-rw-r--r--pkgs/by-name/ti/tic-80/package.nix159
-rw-r--r--pkgs/development/tools/tailwindcss/default.nix12
-rw-r--r--pkgs/servers/invidious/versions.json6
4 files changed, 186 insertions, 25 deletions
diff --git a/pkgs/by-name/co/cowsql/package.nix b/pkgs/by-name/co/cowsql/package.nix
index c14846d67ca06..8089fc95a3578 100644
--- a/pkgs/by-name/co/cowsql/package.nix
+++ b/pkgs/by-name/co/cowsql/package.nix
@@ -1,24 +1,25 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, autoreconfHook
-, pkg-config
-, libuv
-, raft-cowsql
-, sqlite
-, incus
-, gitUpdater
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  autoreconfHook,
+  pkg-config,
+  libuv,
+  raft-cowsql,
+  sqlite,
+  incus,
+  nix-update-script,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "cowsql";
-  version = "1.15.4";
+  version = "1.15.6";
 
   src = fetchFromGitHub {
     owner = "cowsql";
     repo = "cowsql";
     rev = "refs/tags/v${finalAttrs.version}";
-    hash = "sha256-JbLiwWXOrEhqCdM8tWwxl68O5Sga4T7NYCXzqP9+Dh0=";
+    hash = "sha256-cr6AT/n2/6DuGK53JvGLwCkMi4+fS128qxj3X9SJYuw=";
   };
 
   nativeBuildInputs = [
@@ -36,14 +37,15 @@ stdenv.mkDerivation (finalAttrs: {
 
   doCheck = true;
 
-  outputs = [ "dev" "out" ];
+  outputs = [
+    "dev"
+    "out"
+  ];
 
   passthru = {
     inherit (incus) tests;
 
-    updateScript = gitUpdater {
-      rev-prefix = "v";
-    };
+    updateScript = nix-update-script { };
   };
 
   meta = with lib; {
diff --git a/pkgs/by-name/ti/tic-80/package.nix b/pkgs/by-name/ti/tic-80/package.nix
new file mode 100644
index 0000000000000..27fcb0ebcfc89
--- /dev/null
+++ b/pkgs/by-name/ti/tic-80/package.nix
@@ -0,0 +1,159 @@
+{ lib
+, stdenv
+, cmake
+, pkg-config
+, python3
+, ruby
+, rake
+, git
+, curl
+, fetchFromGitHub
+, libGL
+, libGLU
+, alsa-lib
+, libX11
+, xorgproto
+, libICE
+, libXi
+, libXScrnSaver
+, libXcursor
+, libXinerama
+, libXext
+, libXxf86vm
+, libXrandr
+, libxkbcommon
+, wayland
+, wayland-protocols
+, wayland-scanner
+, dbus
+, udev
+, libdecor
+, pipewire
+, libpulseaudio
+, libiconv
+# Whether to build TIC-80's "Pro" version, which is an incentive to support the project financially,
+# that enables some additional features. It is, however, fully open source.
+, withPro ? false
+}:
+let
+  major = "1";
+  minor = "1";
+  revision = "2837";
+  year = "2023";
+in
+
+stdenv.mkDerivation rec {
+  pname = "tic-80";
+  version = "${major}.${minor}.${revision}";
+
+  src = fetchFromGitHub {
+    owner = "nesbox";
+    repo = "TIC-80";
+    rev = "v" + version;
+    sha256 = "sha256-p7OyuD/4KxAzylQDlXW681TvEZwKYDD4zq2KDRkcv48=";
+    # TIC-80 vendors its dependencies as submodules, so to use its current build system,
+    # we need to fetch them. Managing the dependencies ourselves would require a lot of
+    # changes in the build system, which doesn't seem worth it right now. In future versions,
+    # TIC-80 is switching to more modular CMake files, at which point we can reconsider.
+    fetchSubmodules = true;
+  };
+
+  # TIC-80 tries to determine the revision part of the version using its Git history.
+  # Because using leaveDotGit tends be non-reproducible with submodules, we just
+  # hardcode it.
+  # To avoid the awkward copyright range of "2017-1980", which would be caused by the
+  # sandbox environment, hardcode the year of the release.
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace-fail 'set(VERSION_REVISION 0)' 'set(VERSION_REVISION ${revision})' \
+      --replace-fail 'string(TIMESTAMP VERSION_YEAR "%Y")' 'set(VERSION_YEAR "${year}")'
+  '';
+
+  # Taken from pkgs/development/compilers/mruby; necessary so it uses `gcc` instead of `ld` for linking.
+  # https://github.com/mruby/mruby/blob/e502fd88b988b0a8d9f31b928eb322eae269c45a/tasks/toolchains/gcc.rake#L30
+  preBuild = ''
+    unset LD
+  '';
+
+  cmakeFlags = lib.optionals withPro [ "-DBUILD_PRO=On" ] ++ [ "-DBUILD_SDLGPU=On" ];
+  nativeBuildInputs = [
+    cmake
+    curl
+    pkg-config
+    python3
+    rake
+  ];
+  buildInputs = [
+    alsa-lib
+    dbus
+    libdecor
+    libGL
+    libGLU
+    libICE
+    libpulseaudio
+    libX11
+    libXcursor
+    libXext
+    libXi
+    libXinerama
+    libxkbcommon
+    libXrandr
+    libXScrnSaver
+    libXxf86vm
+    pipewire
+    udev
+    wayland
+    wayland-protocols
+    wayland-scanner
+  ];
+
+  # This package borrows heavily from pkgs/development/libraries/SDL2/default.nix
+  # because TIC-80 vendors SDL2, which means we need to take care and implement
+  # a similar environment in TIC-80's vendored copy of SDL2.
+  #
+  # SDL is weird in that instead of just dynamically linking with
+  # libraries when you `--enable-*` (or when `configure` finds) them
+  # it `dlopen`s them at runtime. In principle, this means it can
+  # ignore any missing optional dependencies like alsa, pulseaudio,
+  # some x11 libs, wayland, etc if they are missing on the system
+  # and/or work with wide array of versions of said libraries. In
+  # nixpkgs, however, we don't need any of that. Moreover, since we
+  # don't have a global ld-cache we have to stuff all the propagated
+  # libraries into rpath by hand or else some applications that use
+  # SDL API that requires said libraries will fail to start.
+  #
+  # You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to
+  # list the symbols used in this way.
+  postFixup =
+    let
+      rpath = lib.makeLibraryPath buildInputs;
+    in
+    ''
+      patchelf --set-rpath "$(patchelf --print-rpath $out/bin/tic80):${rpath}" "$out/bin/tic80"
+    '';
+
+  meta = with lib; {
+    description =
+      "A free and open source fantasy computer for making, playing and sharing tiny games";
+    longDescription = ''
+      TIC-80 is a free and open source fantasy computer for making, playing and
+      sharing tiny games.
+
+      There are built-in tools for development: code, sprites, maps, sound
+      editors and the command line, which is enough to create a mini retro
+      game. At the exit you will get a cartridge file, which can be stored and
+      played on the website.
+
+      Also, the game can be packed into a player that works on all popular
+      platforms and distribute as you wish. To make a retro styled game the
+      whole process of creation takes place under some technical limitations:
+      240x136 pixels display, 16 color palette, 256 8x8 color sprites, 4
+      channel sound and etc.
+    '';
+    homepage = "https://github.com/nesbox/TIC-80";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    mainProgram = "tic80";
+    maintainers = with maintainers; [ blinry ];
+  };
+}
diff --git a/pkgs/development/tools/tailwindcss/default.nix b/pkgs/development/tools/tailwindcss/default.nix
index 0b4b4978966b9..7de95576050cc 100644
--- a/pkgs/development/tools/tailwindcss/default.nix
+++ b/pkgs/development/tools/tailwindcss/default.nix
@@ -18,16 +18,16 @@ let
   }.${system} or throwSystem;
 
   hash = {
-    aarch64-darwin = "sha256-QHOOWezvBvlVJDFU59HG6vETcAN8vu5KMsMTg4fi2l0=";
-    aarch64-linux = "sha256-EXjD6LRLnrQ/QOeG7iVmTJPYP20FsGLA2cr0ENZNVYc=";
-    armv7l-linux = "sha256-OOAEsUQARJXNFIYhrbhSwh1dNQ5mMIyP+eL9kKFXJvU=";
-    x86_64-darwin = "sha256-WU0BsDISUZnbEFxmH+I95MBpAGkhuW9/7pjuT7wV+AA=";
-    x86_64-linux = "sha256-poFMyPtuVz3WNzUgk/O46SfFyGKLH/h4JmUpNa8UMLE=";
+    aarch64-darwin = "sha256-Wsys6Iagq/dwOKb+htMWosLL51blPxxq3PX8ioZ1UZw=";
+    aarch64-linux = "sha256-vXvhtfHd/Pg4Pv6X23Y9nC1OFUeju5vBn9SEOaI5G6E=";
+    armv7l-linux = "sha256-ZCqvztsUD+dom6HL/IejSjn9Cy/Rwnn7/QFxtW0XFoU=";
+    x86_64-darwin = "sha256-vVbDvu3R66AwCZgg75k1Mjp2oVsrkdMXtqHA5sdACEo=";
+    x86_64-linux = "sha256-POpm9f2HmGU4cBpVHHNCwpoK4+MTnu1Xxb2RUfZtq5Y=";
   }.${system} or throwSystem;
 in
 stdenv.mkDerivation rec {
   pname = "tailwindcss";
-  version = "3.4.1";
+  version = "3.4.3";
 
   src = fetchurl {
     url = "https://github.com/tailwindlabs/tailwindcss/releases/download/v${version}/tailwindcss-${plat}";
diff --git a/pkgs/servers/invidious/versions.json b/pkgs/servers/invidious/versions.json
index 76eb88aa6b5fb..93c5784c9c1bf 100644
--- a/pkgs/servers/invidious/versions.json
+++ b/pkgs/servers/invidious/versions.json
@@ -1,8 +1,8 @@
 {
   "invidious": {
-    "rev": "99a5e9cbc44daa4555f36b43bc4b7246aee454c9",
-    "hash": "sha256-ep/umuNxTvdPXtJgI3KNt0h5xc1O38wQz1+OsVYOzfE=",
-    "version": "0.20.1-unstable-2024-03-08"
+    "rev": "08390acd0c17875fddb84cabba54197a5b5740e4",
+    "hash": "sha256-75C/ImX/PYikVdSO4rZM/aYyEgx6pU90BHNeRFfcsDM=",
+    "version": "0.20.1-unstable-2024-03-31"
   },
   "videojs": {
     "hash": "sha256-jED3zsDkPN8i6GhBBJwnsHujbuwlHdsVpVqa1/pzSH4="