+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanUpdate and xorg migration504a1b6

main
1.6 KiB60 linesraw
1{ lib, stdenv, fetchFromGitHub, makeDesktopItem, pkgs }: stdenv.mkDerivation rec {
2  pname = "circuit-artist";
3  version = "2026-01-06";
4
5  src = fetchFromGitHub {
6    owner = "lets-all-be-stupid-forever";
7    repo = "circuit-artist";
8    rev = "68b5f25eb16098e852f9ae98eb2141bd172e6b55";
9    hash = "sha256-FuGeNPXO2CWuiZu7Tz2go1eRQqyYZOwpzHmMiw6yb98=";
10    fetchSubmodules = true;
11  };
12
13  nativeBuildInputs = with pkgs; [ cmake pkg-config makeWrapper copyDesktopItems ];
14
15  buildInputs = with pkgs; [
16    raylib
17    gtk3
18    glib
19    libxrandr
20    libxinerama
21    libxcursor
22    libxi
23  ];
24
25  cmakeBuildTarget = "ca";
26
27  installPhase = ''
28    runHook preInstall
29
30    mkdir -p $out/bin
31    cp -r $src/assets $src/solutions $out
32    mkdir -p $out/share/icons/hicolor/32x32/apps
33    cp $src/assets/icon32.png $out/share/icons/hicolor/32x32/apps/circuit-artist.png
34    mv ca $out/bin/ca-unwrapped
35    makeWrapper $out/bin/ca-unwrapped $out/bin/ca \
36      --run 'export data_dir="''${XDG_DATA_HOME:-$HOME/.local/share}/circuit-artist"' \
37      --run 'mkdir -p "$data_dir/bin"' \
38      --run 'cd "$data_dir/bin"' \
39      --run "ln -sfn $out/assets ../assets"
40
41    runHook postInstall
42  '';
43
44  desktopItems = [
45    (makeDesktopItem {
46      name = pname;
47      desktopName = pname;
48      exec = "ca";
49      icon = "circuit-artist";
50    })
51  ];
52
53  meta = {
54    description = "Digital circuit drawing and simulation game";
55    homepage = "https://github.com/lets-all-be-stupid-forever/circuit-artist";
56    license = lib.licenses.gpl3Only;
57    mainProgram = "ca";
58    platforms = lib.platforms.linux;
59  };
60}