2019-12-09 03:52:41 +01:00
|
|
|
# This file controls the import of external dependencies (i.e.
|
|
|
|
# third-party code) into my package tree.
|
|
|
|
#
|
|
|
|
# This includes *all packages needed from nixpkgs*.
|
2020-02-21 13:47:29 +01:00
|
|
|
{ ... }:
|
2019-12-09 03:52:41 +01:00
|
|
|
|
|
|
|
let
|
2021-03-24 18:34:40 +01:00
|
|
|
# Tracking nixos-unstable as of 2021-03-25.
|
|
|
|
nixpkgsCommit = "60dd94fb7e01a8288f6638eee71d7cb354c49327";
|
2020-01-01 16:49:53 +01:00
|
|
|
nixpkgsSrc = fetchTarball {
|
2020-11-21 18:22:54 +01:00
|
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsCommit}.tar.gz";
|
2021-03-24 18:34:40 +01:00
|
|
|
sha256 = "0skdwk9bdld295kzrymirs8xrzycqmhsclaz8s18jhcz75hb8sk3";
|
2019-12-09 03:52:41 +01:00
|
|
|
};
|
2020-01-01 16:49:53 +01:00
|
|
|
nixpkgs = import nixpkgsSrc {
|
2019-12-09 03:52:41 +01:00
|
|
|
config.allowUnfree = true;
|
|
|
|
config.allowBroken = true;
|
2020-06-19 02:53:09 +02:00
|
|
|
|
|
|
|
# Lutris depends on p7zip, which is considered insecure.
|
|
|
|
config.permittedInsecurePackages = [
|
|
|
|
"p7zip-16.02"
|
|
|
|
];
|
2019-12-09 03:52:41 +01:00
|
|
|
};
|
|
|
|
|
2021-03-24 18:34:40 +01:00
|
|
|
# Tracking nixos-20.09 as of 2021-03-25.
|
|
|
|
stableCommit = "223d0d733a66b46504ea6b4c15f88b7cc4db58fb";
|
2020-05-22 19:55:15 +02:00
|
|
|
stableNixpkgsSrc = fetchTarball {
|
2020-11-21 19:20:35 +01:00
|
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${stableCommit}.tar.gz";
|
2021-03-24 18:34:40 +01:00
|
|
|
sha256 = "073327ris0frqa3kpid3nsjr9w8yx2z83xpsc24w898mrs9r7d5v";
|
2020-05-22 19:55:15 +02:00
|
|
|
};
|
|
|
|
stableNixpkgs = import stableNixpkgsSrc {};
|
|
|
|
|
2021-01-11 09:55:47 +01:00
|
|
|
exposed = import ./nixpkgs-exposed/exposed { inherit nixpkgs stableNixpkgs; };
|
2019-12-09 03:52:41 +01:00
|
|
|
|
2020-05-31 22:58:17 +02:00
|
|
|
in exposed.lib.fix(self: exposed // {
|
|
|
|
callPackage = nixpkgs.lib.callPackageWith self;
|
2019-12-27 18:12:32 +01:00
|
|
|
|
2019-12-09 03:52:41 +01:00
|
|
|
# Provide the source code of nixpkgs, but do not provide an imported
|
|
|
|
# version of it.
|
2020-05-26 12:52:30 +02:00
|
|
|
inherit nixpkgsCommit nixpkgsSrc stableNixpkgsSrc;
|
2019-12-27 18:12:32 +01:00
|
|
|
|
|
|
|
# Packages to be overridden
|
|
|
|
originals = {
|
2020-07-17 01:26:48 +02:00
|
|
|
inherit (nixpkgs) gtest openldap go grpc notmuch rr;
|
2021-01-26 14:05:56 +01:00
|
|
|
inherit (stableNixpkgs) git tdlib;
|
2020-04-04 03:26:55 +02:00
|
|
|
ffmpeg = nixpkgs.ffmpeg-full;
|
2021-01-26 14:05:56 +01:00
|
|
|
telega = stableNixpkgs.emacsPackages.telega;
|
2019-12-27 18:12:32 +01:00
|
|
|
};
|
2020-01-04 16:08:49 +01:00
|
|
|
|
2020-11-27 19:43:33 +01:00
|
|
|
# Use LLVM 11
|
|
|
|
llvmPackages = nixpkgs.llvmPackages_11;
|
|
|
|
clangStdenv = nixpkgs.llvmPackages_11.stdenv;
|
|
|
|
stdenv = nixpkgs.llvmPackages_11.stdenv;
|
|
|
|
|
|
|
|
clang-tools = (nixpkgs.clang-tools.override {
|
|
|
|
llvmPackages = nixpkgs.llvmPackages_11;
|
|
|
|
});
|
2020-05-22 23:57:46 +02:00
|
|
|
|
2020-08-17 11:58:57 +02:00
|
|
|
# Provide Emacs 27
|
|
|
|
#
|
|
|
|
# The assert exists because the name of the attribute is unversioned
|
|
|
|
# (which is different from previous versions).
|
|
|
|
emacs27 = assert ((exposed.lib.versions.major nixpkgs.emacs.version) == "27");
|
2020-08-18 23:53:05 +02:00
|
|
|
nixpkgs.emacs.overrideAttrs(old: {
|
|
|
|
configureFlags = old.configureFlags ++ [ "--with-cairo" ];
|
|
|
|
});
|
|
|
|
|
2020-08-17 11:58:57 +02:00
|
|
|
emacs27-nox = assert ((exposed.lib.versions.major nixpkgs.emacs.version) == "27");
|
|
|
|
nixpkgs.emacs-nox;
|
|
|
|
|
2020-01-04 16:08:49 +01:00
|
|
|
# Make NixOS available
|
2020-06-07 20:28:59 +02:00
|
|
|
nixos = import "${nixpkgsSrc}/nixos";
|
2020-05-31 22:58:17 +02:00
|
|
|
})
|