linear: init at 1.30.2 (#521092)

This commit is contained in:
Sandro
2026-05-19 00:40:35 +00:00
committed by GitHub
3 changed files with 72 additions and 0 deletions

View File

@@ -11667,6 +11667,12 @@
name = "Silvan Mosberger";
keys = [ { fingerprint = "6C2B 55D4 4E04 8266 6B7D DA1A 422E 9EDA E015 7170"; } ];
};
iniw = {
email = "git@vini.cat";
github = "iniw";
githubId = 30220881;
name = "Vinicius Deolindo";
};
insipx = {
email = "github@andrewplaza.dev";
github = "insipx";

View File

@@ -0,0 +1,48 @@
{
lib,
stdenvNoCC,
fetchurl,
_7zz,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "linear";
version = "1.30.2";
src = fetchurl {
url = "https://releases.linear.app/Linear-${finalAttrs.version}-universal.dmg";
hash = "sha256-udtN7sOnbT1B684q/JhPFGq8mYvhc5CbTxuJi6NYFac=";
};
strictDeps = true;
__structuredAttrs = true;
nativeBuildInputs = [ _7zz ];
sourceRoot = "Linear";
# -snld prevents "ERROR: Dangerous symbolic link path was ignored".
# -xr'!*:com.apple.*' prevents macOS extended attributes from being
# extracted as regular files, which corrupts the .app bundle.
unpackCmd = "7zz x -snld -xr'!*:com.apple.*' $curSrc";
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -R Linear.app "$out/Applications"
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
description = "App to manage software development and track bugs";
homepage = "https://linear.app/";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ iniw ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils curl gnugrep common-updater-scripts
#shellcheck shell=bash
set -eu -o pipefail
source_url="https://releases.linear.app/mac"
version="$(curl -L -I "$source_url" | grep -ioE 'filename="Linear-[0-9]+(\.[0-9]+)*-universal\.dmg"' | grep -oE '[0-9]+(\.[0-9]+)*')"
if [[ -z $version ]]; then
echo "Could not find the latest Linear version in release headers" >&2
exit 1
fi
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "https://releases.linear.app/Linear-${version}-universal.dmg")")
update-source-version linear "$version" "$hash" --ignore-same-version