This repository has been archived on 2026-09-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
linear-linux/flake.nix
T
Michael Lyonandclaude a1455d88d8 Add Nix flake for declarative installation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-03 10:56:39 -06:00

72 lines
2.4 KiB
Nix

{
description = "Unofficial Linux desktop client for Linear (linear.app)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
version = "0.2.5";
sources = {
x86_64-linux = {
url = "https://github.com/kleo-dev/linear-linux/releases/download/v${version}/linear-linux-${version}-x86_64.AppImage";
hash = "sha256-NBmfXyrmtBccOLLzBiwbkCyA8IGxtY+AQIgAVxfrank="; # x86_64
};
aarch64-linux = {
url = "https://github.com/kleo-dev/linear-linux/releases/download/v${version}/linear-linux-${version}-arm64.AppImage";
hash = "sha256-nNDo7cq05as0qoEbd1UkOG+s8PzFZxnovcqLsg11RlU="; # aarch64
};
};
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
src = pkgs.fetchurl {
url = sources.${system}.url;
hash = sources.${system}.hash;
};
in
{
linear-linux = pkgs.appimageTools.wrapType2 {
pname = "linear-linux";
inherit version src;
extraInstallCommands =
let
appimageContents = pkgs.appimageTools.extractType2 {
pname = "linear-linux";
inherit version src;
};
in
''
# Install desktop file
install -Dm644 ${appimageContents}/linear-linux.desktop \
$out/share/applications/linear-linux.desktop
substituteInPlace $out/share/applications/linear-linux.desktop \
--replace-warn 'Exec=AppRun' 'Exec=linear-linux'
# Install icons
install -Dm644 ${appimageContents}/usr/share/icons/hicolor/1024x1024/apps/linear-linux.png \
$out/share/icons/hicolor/1024x1024/apps/linear-linux.png
'';
meta = with pkgs.lib; {
description = "Unofficial Linux desktop client for Linear (linear.app)";
homepage = "https://github.com/kleo-dev/linear-linux";
license = licenses.isc;
platforms = [ "x86_64-linux" "aarch64-linux" ];
mainProgram = "linear-linux";
};
};
default = self.packages.${system}.linear-linux;
}
);
};
}