2022-07-04 19:41:04 +00:00
|
|
|
{ nixpkgs, nixpkgs-unstable, nur, ... }@inputs:
|
2021-10-29 17:31:16 +00:00
|
|
|
let
|
|
|
|
overlay-unstable = final: prev: {
|
|
|
|
unstable = import nixpkgs-unstable { config.allowUnfree = true; system = prev.system; };
|
2022-07-04 19:41:04 +00:00
|
|
|
x86 = import nixpkgs-unstable { system = prev.system; config.allowUnsupportedSystem = true; };
|
2021-10-29 17:31:16 +00:00
|
|
|
};
|
|
|
|
overlay-needs-unstable = final: prev: {
|
|
|
|
# override some packages that needs unstable that cannot be changed in the setup.
|
|
|
|
nix-direnv = prev.unstable.nix-direnv;
|
2023-07-03 20:42:03 +00:00
|
|
|
|
|
|
|
# Typst updates really quickly.
|
|
|
|
typst = final.unstable.typst;
|
|
|
|
typst-lsp = final.unstable.typst-lsp;
|
2021-10-29 17:31:16 +00:00
|
|
|
};
|
|
|
|
overlay-imported = final: prev: {
|
2023-06-30 23:43:23 +00:00
|
|
|
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
|
2023-04-23 09:41:24 +00:00
|
|
|
deploy-rs = inputs.deploy-rs.packages.default;
|
2023-07-16 13:49:44 +00:00
|
|
|
dtth-phanpy = inputs.dtth-phanpy.packages.${final.system}.default;
|
2023-11-07 12:48:55 +00:00
|
|
|
matrix-conduit = inputs.conduit.packages.${final.system}.default.overrideAttrs (attrs: {
|
|
|
|
patches = (if "patches" ? attrs then attrs.patches else [ ]) ++ [
|
|
|
|
./overlays/conduit-remove-dbg.patch
|
|
|
|
];
|
|
|
|
});
|
2022-07-06 20:26:50 +00:00
|
|
|
|
|
|
|
# A list of source-style inputs.
|
|
|
|
sources = final.lib.attrsets.filterAttrs (name: f: !(builtins.hasAttr "outputs" f)) inputs;
|
2021-10-29 17:31:16 +00:00
|
|
|
};
|
2022-07-06 19:56:28 +00:00
|
|
|
|
2023-06-07 08:48:29 +00:00
|
|
|
overlay-versioning = final: prev: {
|
2023-12-02 20:48:09 +00:00
|
|
|
gotosocial = prev.gotosocial.overrideAttrs (attrs: rec {
|
2024-03-06 14:14:15 +00:00
|
|
|
version = "0.14.0";
|
2023-12-02 20:48:09 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
web-assets = final.fetchurl {
|
|
|
|
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v${version}/gotosocial_${version}_web-assets.tar.gz";
|
2024-03-06 14:14:15 +00:00
|
|
|
hash = "sha256-T5rqVG+V+4S02nblRuZgW7pb644C/EOdmLwYwL8hrK8=";
|
2023-12-02 20:48:09 +00:00
|
|
|
};
|
|
|
|
src = final.fetchFromGitHub {
|
|
|
|
owner = "superseriousbusiness";
|
|
|
|
repo = "gotosocial";
|
|
|
|
rev = "v${version}";
|
2024-03-06 14:14:15 +00:00
|
|
|
hash = "sha256-EezOOe8IfOo3LO2eE0UNZC+txurvRefjGEoyV/IGQXE=";
|
2023-12-02 20:48:09 +00:00
|
|
|
};
|
|
|
|
postInstall = ''
|
|
|
|
tar xf ${web-assets}
|
|
|
|
mkdir -p $out/share/gotosocial
|
|
|
|
mv web $out/share/gotosocial/
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2024-02-23 18:02:30 +00:00
|
|
|
input-remapper = final.unstable.input-remapper;
|
2024-03-01 10:31:23 +00:00
|
|
|
|
|
|
|
kakoune-unwrapped =
|
|
|
|
prev.kakoune-unwrapped.overrideAttrs (attrs: {
|
|
|
|
version = "r${builtins.substring 0 6 inputs.kakoune.rev}";
|
|
|
|
src = inputs.kakoune;
|
|
|
|
patches = [
|
|
|
|
# patches in the original package was already applied
|
|
|
|
|
|
|
|
# https://github.com/mawww/kakoune/pull/5108
|
|
|
|
(final.fetchpatch {
|
|
|
|
url = "https://github.com/mawww/kakoune/commit/64b3433905eeb33653ed617d61906ba68c686916.patch";
|
|
|
|
hash = "sha256-XYA4GcOEuWHsnDhMI0nXbg9Myv2o1UZ8qvzavIXbkJo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
2023-06-07 08:48:29 +00:00
|
|
|
};
|
2022-09-02 21:07:53 +00:00
|
|
|
|
|
|
|
overlay-libs = final: prev: {
|
|
|
|
libs.crane = inputs.crane.lib.${prev.system};
|
|
|
|
};
|
2023-02-25 20:43:29 +00:00
|
|
|
|
2023-05-04 12:34:00 +00:00
|
|
|
overlay-packages = final: prev: {
|
2023-06-29 16:36:53 +00:00
|
|
|
kak-tree-sitter = final.callPackage ./packages/common/kak-tree-sitter.nix { rustPlatform = final.unstable.rustPlatform; };
|
2023-05-04 12:34:00 +00:00
|
|
|
};
|
|
|
|
|
2023-02-25 20:43:29 +00:00
|
|
|
overlay-aarch64-linux = final: prev:
|
2023-02-26 01:23:48 +00:00
|
|
|
let
|
|
|
|
optionalOverride = pkg: alt:
|
|
|
|
if prev.stdenv.isLinux && prev.stdenv.isAarch64 then alt else pkg;
|
|
|
|
in
|
2023-02-25 20:43:29 +00:00
|
|
|
{
|
2023-02-27 15:10:45 +00:00
|
|
|
# See https://github.com/sharkdp/fd/issues/1085
|
2023-02-26 01:23:48 +00:00
|
|
|
fd = optionalOverride prev.fd (prev.fd.overrideAttrs (attrs: {
|
|
|
|
preBuild = ''
|
|
|
|
export JEMALLOC_SYS_WITH_LG_PAGE=16
|
|
|
|
'';
|
|
|
|
}));
|
2023-02-27 15:10:45 +00:00
|
|
|
# See https://www.reddit.com/r/AsahiLinux/comments/zqejue/kitty_not_working_with_mesaasahiedge/
|
2023-02-26 01:23:48 +00:00
|
|
|
kitty = optionalOverride prev.kitty (final.writeShellApplication {
|
|
|
|
name = "kitty";
|
|
|
|
runtimeInputs = [ ];
|
|
|
|
text = ''
|
|
|
|
MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330 ${prev.kitty}/bin/kitty "$@"
|
|
|
|
'';
|
|
|
|
});
|
2023-02-27 15:10:45 +00:00
|
|
|
# Zotero does not have their own aarch64-linux build
|
2023-03-13 17:34:07 +00:00
|
|
|
zotero = optionalOverride prev.zotero (final.callPackage ./packages/aarch64-linux/zotero.nix { });
|
2023-02-27 17:31:50 +00:00
|
|
|
# Typora for aarch64-linux only
|
|
|
|
typora = optionalOverride
|
|
|
|
(builtins.abort "no support for non-aarch64-linux")
|
|
|
|
(final.callPackage ./packages/aarch64-linux/typora.nix { });
|
2023-02-25 20:43:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
overlay-asahi = inputs.nixos-m1.overlays.default;
|
2021-10-29 17:31:16 +00:00
|
|
|
in
|
2022-07-04 19:41:04 +00:00
|
|
|
[
|
|
|
|
(import ./overlays/openrazer)
|
|
|
|
overlay-unstable
|
|
|
|
overlay-needs-unstable
|
2023-05-04 12:34:00 +00:00
|
|
|
overlay-packages
|
2022-07-04 19:41:04 +00:00
|
|
|
overlay-imported
|
2022-07-06 19:56:28 +00:00
|
|
|
overlay-versioning
|
2022-09-02 21:07:53 +00:00
|
|
|
overlay-libs
|
2023-02-25 20:43:29 +00:00
|
|
|
overlay-asahi
|
|
|
|
overlay-aarch64-linux
|
2022-07-04 19:41:04 +00:00
|
|
|
nur.overlay
|
2021-11-29 18:17:20 +00:00
|
|
|
|
2023-03-01 15:58:01 +00:00
|
|
|
(import ./packages/common)
|
|
|
|
|
2023-03-31 08:26:13 +00:00
|
|
|
inputs.mpd-mpris.overlays.default
|
2023-04-18 23:09:20 +00:00
|
|
|
inputs.swayfx.overlays.default
|
2023-06-19 23:27:51 +00:00
|
|
|
inputs.youmubot.overlays.default
|
2023-03-31 08:26:13 +00:00
|
|
|
|
2022-07-04 19:41:04 +00:00
|
|
|
# Bug fixes
|
|
|
|
] # we assign the overlay created before to the overlays of nixpkgs.
|
2021-10-29 17:31:16 +00:00
|
|
|
|