xin/overlays/default.nix

73 lines
2.1 KiB
Nix
Raw Normal View History

2022-08-25 12:21:35 -06:00
{ self, config, pkgs, lib, isUnstable, ... }:
2022-10-05 14:08:12 -06:00
let
2022-11-21 12:10:53 -07:00
tailscale = self: super: {
tailscale = super.tailscale.overrideAttrs (old: rec {
version = "1.32.3";
src = super.fetchFromGitHub {
owner = "tailscale";
repo = "tailscale";
rev = "v${version}";
sha256 = "sha256-CYNHD6TS9KTRftzSn9vAH4QlinqNgU/yZuUYxSvsl/M=";
};
2022-11-21 19:43:02 -07:00
ldflags = [
"-X tailscale.com/version.Long=${version}"
"-X tailscale.com/version.Short=${version}"
];
2022-11-21 12:10:53 -07:00
});
};
2022-10-05 14:08:12 -06:00
in {
2022-11-01 11:04:15 -06:00
nixpkgs.overlays = if isUnstable then
2022-11-21 12:10:53 -07:00
[ tailscale ]
2022-11-22 21:30:31 -07:00
else
[
tailscale
(self: super: {
matrix-synapse = super.matrix-synapse.overrideAttrs (old: rec {
version = "1.72.0";
src = super.fetchFromGitHub {
owner = "matrix-org";
repo = "synapse";
rev = "v${version}";
sha256 = "sha256-LkzUrEXC+jonkEpAGIEDQhAKisrKNQB8/elchN/4YMU=";
};
2022-11-01 07:35:08 -06:00
2022-11-22 21:30:31 -07:00
cargoDeps = super.rustPlatform.fetchCargoTarball {
inherit src;
name = "matrix-synapse-${version}";
sha256 = "sha256-AuQURcVaIoOYG9jh6QhPpXB0akASVWMYe4fA/376cwo=";
};
});
})
2022-11-01 07:35:08 -06:00
2022-11-22 21:30:31 -07:00
];
2022-08-25 12:21:35 -06:00
}
# Example Python dep overlay
# (self: super: {
# python3 = super.python3.override {
# packageOverrides = python-self: python-super: {
# canonicaljson = python-super.canonicaljson.overrideAttrs (oldAttrs: {
# nativeBuildInputs = [ python-super.setuptools ];
# });
# };
# };
# })
# Example of an overlay that changes the buildGoModule function
#tailscale = self: super: {
# tailscale = super.callPackage "${super.path}/pkgs/servers/tailscale" {
# buildGoModule = args:
# super.buildGo119Module (args // rec {
# version = "1.32.2";
# src = super.fetchFromGitHub {
# owner = "tailscale";
# repo = "tailscale";
# rev = "v${version}";
# sha256 = "sha256-CYNHD6TS9KTRftzSn9vAH4QlinqNgU/yZuUYxSvsl/M=";
# };
# vendorSha256 = "sha256-VW6FvbgLcokVGunTCHUXKuH5+O6T55hGIP2g5kFfBsE=";
# });
# };
#};