dotfiles/pkgs/default.nix

183 lines
7.8 KiB
Nix
Raw Normal View History

2023-04-11 00:58:02 +07:00
{ pkgs
, lib
2023-12-18 08:48:49 +07:00
, inputs
, pkgs' ? pkgs
, isOverlay ? true
2023-12-18 08:48:49 +07:00
, ...
}:
2023-04-11 00:58:02 +07:00
let
inherit (pkgs') callPackage;
sources = import ./_sources/generated.nix {
2023-04-11 00:58:02 +07:00
inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools;
};
2023-11-21 04:46:52 +07:00
nixForNixPlugins = pkgs.nixVersions.nix_2_18;
2023-12-18 08:48:49 +07:00
nur = import inputs.nur {
inherit pkgs;
nurpkgs = pkgs;
};
2023-04-11 00:58:02 +07:00
in
2023-06-14 17:26:54 +07:00
{
2023-12-18 08:48:49 +07:00
inherit (inputs.nix-gaming.packages.${pkgs.system}) faf-client osu-lazer-bin;
inherit nixForNixPlugins;
2023-08-16 05:10:49 +07:00
nix = nixForNixPlugins;
2024-01-27 03:57:21 +07:00
nixVersions = pkgs.nixVersions // {
2023-08-16 05:10:49 +07:00
stable = nixForNixPlugins;
unstable = nixForNixPlugins;
2024-01-27 03:57:21 +07:00
};
2024-06-06 23:20:08 +07:00
matrix-appservice-discord = pkgs.matrix-appservice-discord.overrideAttrs (old: {
2024-06-08 02:17:37 +07:00
doCheck = false;
2024-06-06 23:20:08 +07:00
patches = (old.patches or []) ++ [
# https://github.com/matrix-org/matrix-appservice-discord/pull/917
2024-06-06 23:20:08 +07:00
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/eb989fa710e8db4ebc8f2ce36c6679ee6cbc1a44.patch";
hash = "sha256-GPeFDw3XujqXHJveHSsBHwHuG51vad50p55FX1Esq58=";
name = "set-missing-config-defaults.patch";
2024-06-06 23:20:08 +07:00
})
# https://github.com/matrix-org/matrix-appservice-discord/pull/918
2024-06-06 23:20:08 +07:00
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/a4cd5e3a6a2d544adac2a263e164671c8a9009d9.patch";
hash = "sha256-qQJ4V6/Ns2Msu8+X8JoEycuQ2Jc90TXulsuLLmPecGU=";
name = "dont-send-filenames.patch";
2024-06-06 23:20:08 +07:00
})
# https://github.com/matrix-org/matrix-appservice-discord/pull/878/
2024-06-06 23:20:08 +07:00
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/fc850ba2473973e28858449ec4020380470d78b2.patch";
hash = "sha256-Lq0FWmR08wLsoq4APRTokZzb7U2po98pgyxH4UR/9/M=";
name = "bridge-discord-replies-1.patch";
2024-06-06 23:20:08 +07:00
})
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/86388901fa44d5d0f9d3dec8727c18cc00d613e7.patch";
hash = "sha256-XcLbKJPmFZElzwU4YS8Md8dNLajddJPKmau0U65bp00=";
name = "bridge-discord-replies-2.patch";
})
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/8299c626188e676723a708e49635d2c4afa26ffa.patch";
hash = "sha256-ZfUwpJ21/m3QbktbxxHyO8Lcl/IuDhaSKQRXBEPeJBo=";
name = "bridge-discord-replies-3.patch";
})
# https://github.com/matrix-org/matrix-appservice-discord/pull/819
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/1c3223387aaf78ba5637f58ca57bd8206ad0446c.patch";
hash = "sha256-3hxyqjI9F4j/XBq/59b7c2PorYRN2mR4XZJjpygs9dI=";
name = "bridge-matrix-edits-1.patch";
})
(pkgs.fetchpatch {
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/f8e9449908b332d97f11932fb835552adca0aa5b.patch";
hash = "sha256-1qb4Zah1XKzxTpVJqOOqz+TiXMFmnsIMZeuqJQdqSIA=";
name = "bridge-matrix-edits-2.patch";
2024-06-06 23:20:08 +07:00
})
2024-06-08 02:17:37 +07:00
./matrix-appservice-discord/disable-attachment-forwarding-to-matrix.patch
2024-06-06 23:20:08 +07:00
];
});
2023-08-16 05:10:49 +07:00
# Various patches to change Nix version of existing packages so they don't error out because of nix-plugins in nix.conf
2024-01-27 03:57:21 +07:00
/*nix-plugins = (pkgs.nix-plugins.override { nix = nixForNixPlugins; }).overrideAttrs (old: {
2023-11-21 04:46:52 +07:00
version = "13.0.0";
2023-08-14 03:50:27 +07:00
patches = [
(pkgs.fetchpatch {
2023-11-21 04:46:52 +07:00
# pull 16
url = "https://github.com/chayleaf/nix-plugins/commit/8f945cadad7f2e60e8f308b2f498ec5e16961ede.patch";
hash = "sha256-pOogMtjXYkSDtXW12TmBpGr/plnizJtud2nP3q2UldQ=";
2023-08-14 03:50:27 +07:00
})
];
2024-01-27 03:57:21 +07:00
});*/
2024-03-19 15:30:38 +07:00
harmonia = (pkgs.harmonia.override { nixVersions.nix_2_21 = nixForNixPlugins; }).overrideAttrs (old: rec {
2024-01-27 03:57:21 +07:00
version = "0.7.3";
src = old.src.override {
rev = "refs/tags/${old.pname}-v${version}";
hash = "sha256-XtnK54HvZMKZGSCrVD0FO5PQLMo3Vkj8ezUlsfqStq0=";
};
cargoDeps = pkgs.rustPlatform.importCargoLock { lockFile = "${src}/Cargo.lock"; };
2023-11-21 04:46:52 +07:00
});
nix-init = pkgs.nix-init.override { nix = nixForNixPlugins; };
nix-serve = pkgs.nix-serve.override { nix = nixForNixPlugins; };
nix-serve-ng = pkgs.nix-serve-ng.override { nix = nixForNixPlugins; };
2023-08-14 03:50:27 +07:00
hydra_unstable = (pkgs.hydra_unstable.override {
2024-01-27 03:57:21 +07:00
nix = nixForNixPlugins;
2023-11-21 04:46:52 +07:00
}).overrideAttrs (old: {
2024-01-27 03:57:21 +07:00
version = "2023-12-01";
# who cares about tests amirite
2023-11-21 04:46:52 +07:00
doCheck = false;
2024-01-27 03:57:21 +07:00
src = old.src.override {
rev = "4d1c8505120961f10897b8fe9a070d4e193c9a13";
hash = "sha256-vXTuE83GL15mgZHegbllVAsVdDFcWWSayPfZxTJN5ys=";
};
2023-11-21 04:46:52 +07:00
});
2023-08-14 03:50:27 +07:00
nurl = pkgs.nurl.override { nix = nixForNixPlugins; };
2023-12-19 11:12:34 +07:00
buffyboard = pkgs.callPackage ./buffyboard { };
clang-tools_latest = pkgs.clang-tools_16;
clang_latest = pkgs.clang_16;
/*ghidra = pkgs.ghidra.overrideAttrs (old: {
2023-04-11 00:58:02 +07:00
patches = old.patches ++ [ ./ghidra-stdcall.patch ];
});*/
2023-10-19 02:02:47 +07:00
gimp = callPackage ./gimp { inherit (pkgs) gimp; };
home-daemon = callPackage ./home-daemon { };
2023-04-11 00:58:02 +07:00
# pin version
looking-glass-client = pkgs.looking-glass-client.overrideAttrs (old: {
version = "B6";
src = pkgs.fetchFromGitHub {
owner = "gnif";
repo = "LookingGlass";
rev = "B6";
sha256 = "sha256-6vYbNmNJBCoU23nVculac24tHqH7F4AZVftIjL93WJU=";
fetchSubmodules = true;
};
});
kvmfrOverlay = kvmfr: kvmfr.overrideAttrs (old: {
inherit (pkgs'.looking-glass-client) version src;
});
2023-12-24 14:27:43 +07:00
mobile-config-firefox = callPackage ./mobile-config-firefox { };
2024-05-08 02:06:54 +07:00
osu-wine = callPackage ./osu-wine { };
ping-exporter = callPackage ./ping-exporter { };
2023-04-11 00:58:02 +07:00
proton-ge = pkgs.stdenvNoCC.mkDerivation {
inherit (sources.proton-ge) pname version src;
installPhase = ''
mkdir -p $out
tar -C $out --strip=1 -x -f $src
'';
};
2023-04-10 19:21:20 +07:00
rofi-steam-game-list = callPackage ./rofi-steam-game-list { };
scanservjs = callPackage ./scanservjs { };
searxng = pkgs'.python3.pkgs.toPythonModule (pkgs.searxng.overrideAttrs (old: {
inherit (sources.searxng) src;
version = "unstable-" + sources.searxng.date;
2023-11-21 04:46:52 +07:00
postInstall = builtins.replaceStrings [ "/botdetection" ] [ "" ] old.postInstall;
}));
2023-12-24 14:27:43 +07:00
schlock = callPackage ./schlock { };
2023-04-10 19:21:20 +07:00
techmino = callPackage ./techmino { };
2023-04-11 00:58:02 +07:00
firefoxAddons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
mpvScripts = lib.optionalAttrs isOverlay pkgs.mpvScripts // callPackage ./mpv-scripts { };
qemu_7 = callPackage ./qemu/7.nix {
2023-06-24 07:12:11 +07:00
stdenv = pkgs'.ccacheStdenv;
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices Cocoa Hypervisor vmnet;
inherit (pkgs.darwin.stubs) rez setfile;
inherit (pkgs.darwin) sigtool;
};
qemu_7_kvm = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; });
qemu_7_full = lib.lowPrio (pkgs'.qemu_7.override { smbdSupport = true; cephSupport = true; glusterfsSupport = true; });
qemu_7_xen = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; xenSupport = true; xen = pkgs.xen-slim; });
qemu_7_xen-light = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; xenSupport = true; xen = pkgs.xen-light; });
qemu_7_xen_4_15 = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; xenSupport = true; xen = pkgs.xen_4_15-slim; });
qemu_7_xen_4_15-light = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; xenSupport = true; xen = pkgs.xen_4_15-light; });
qemu_7_test = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; nixosTestRunner = true; });
# TODO: when https://gitlab.com/virtio-fs/virtiofsd/-/issues/96 is fixed remove this
virtiofsd = callPackage ./qemu/virtiofsd.nix {
qemu = pkgs'.qemu_7;
2023-10-19 02:02:47 +07:00
};
qemu_7_ccache = pkgs'.qemu_7.override {
stdenv = pkgs'.ccacheStdenv;
};
virtiofsd_ccache = pkgs'.virtiofsd.override {
qemu = pkgs'.qemu_7_ccache;
2023-06-24 07:12:11 +07:00
stdenv = pkgs'.ccacheStdenv;
};
2023-09-13 17:20:18 +07:00
}
2023-10-19 02:02:47 +07:00
// import ./ccache.nix { inherit pkgs pkgs' lib sources; }
// import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }
2023-12-19 11:12:34 +07:00
// import ../system/hardware/oneplus-enchilada/pkgs.nix { inherit inputs pkgs pkgs' lib sources; }