Unverified Commit 977c9efc authored by Christina Sørensen's avatar Christina Sørensen Committed by GitHub
Browse files

uiua-unstable: init at 0.14.0-dev.6 (#362951)

parents e4c9d406 3c1facf9
Loading
Loading
Loading
Loading
+7 −15
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
  fetchFromGitHub,
  pkg-config,

  darwin,
  audioSupport ? true,
  alsa-lib,
  webcamSupport ? false,
@@ -13,39 +12,32 @@
  # passthru.tests.run
  runCommand,
  uiua,

  unstable ? false,
}:

let
  inherit (darwin.apple_sdk.frameworks) AppKit AudioUnit CoreServices;
  versionInfo = import (if unstable then ./unstable.nix else ./stable.nix);
in
rustPlatform.buildRustPackage rec {
  pname = "uiua";
  version = "0.13.0";
  inherit (versionInfo) version cargoHash;

  src = fetchFromGitHub {
    owner = "uiua-lang";
    repo = "uiua";
    rev = version;
    hash = "sha256-5IqJ/lvozXzc7LRUzxpG04M3Nir+3h+GoL7dqTgC9J8=";
    inherit (versionInfo) rev hash;
  };

  cargoHash = "sha256-0hbE2ZH7daw/VQLe51CxOIborABDF0x00kTyx9NCs9g=";

  nativeBuildInputs =
    lib.optionals (webcamSupport || stdenv.hostPlatform.isDarwin) [ rustPlatform.bindgenHook ]
    ++ lib.optionals audioSupport [ pkg-config ];

  buildInputs =
    lib.optionals stdenv.hostPlatform.isDarwin [
      AppKit
      CoreServices
    ]
    ++ lib.optionals (audioSupport && stdenv.hostPlatform.isDarwin) [ AudioUnit ]
    ++ lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ];
  buildInputs = lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ];

  buildFeatures = lib.optional audioSupport "audio" ++ lib.optional webcamSupport "webcam";

  passthru.updateScript = ./update.sh;
  passthru.updateScript = versionInfo.updateScript;
  passthru.tests.run = runCommand "uiua-test-run" { nativeBuildInputs = [ uiua ]; } ''
    uiua init
    diff -U3 --color=auto <(uiua run main.ua) <(echo '"Hello, World!"')
+7 −0
Original line number Diff line number Diff line
rec {
  version = "0.13.0";
  rev = version;
  hash = "sha256-5IqJ/lvozXzc7LRUzxpG04M3Nir+3h+GoL7dqTgC9J8=";
  cargoHash = "sha256-0hbE2ZH7daw/VQLe51CxOIborABDF0x00kTyx9NCs9g=";
  updateScript = ./update-stable.sh;
}
+7 −0
Original line number Diff line number Diff line
rec {
  version = "0.14.0-dev.6";
  rev = version;
  hash = "sha256-YRv4i014xD4d8YN5PuMsa06+7kZgISPBGkKrVLU5ZN0=";
  cargoHash = "sha256-GYBHaYGmKcV0Gw1I4IWzfmecHwQtb2ys5bMguqfo8S0=";
  updateScript = ./update-unstable.sh;
}
+1 −1
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix-update common-updater-scripts

nix-update uiua
nix-update --override-filename pkgs/by-name/ui/uiua/stable.nix --version-regex '^(\d*\.\d*\.\d*)$' uiua

EXT_VER=$(curl https://raw.githubusercontent.com/uiua-lang/uiua-vscode/main/package.json | jq -r .version)
update-source-version vscode-extensions.uiua-lang.uiua-vscode $EXT_VER
+4 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update

nix-update --override-filename pkgs/by-name/ui/uiua/unstable.nix uiua-unstable
Loading