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
|
2020-11-21 18:22:54 +01:00
|
|
|
# Tracking nixos-unstable as of 2020-11-21.
|
|
|
|
nixpkgsCommit = "a322b32e9d74fb476944ff6cfb55833dc69cfaaa";
|
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";
|
|
|
|
sha256 = "1r0mkiqxija75spnyksmh8x5j4smnrxv5f7768s81gsl570kls0l";
|
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
|
|
|
};
|
|
|
|
|
2020-11-21 19:20:35 +01:00
|
|
|
# Tracking nixos-20.09 as of 2020-11-21.
|
|
|
|
stableCommit = "58f9c4c7d3a42c912362ca68577162e38ea8edfb";
|
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";
|
|
|
|
sha256 = "1517dy07jf4zhzknqbgm617lgjxsn7a6k1vgq61c67f6h55qs5ij";
|
2020-05-22 19:55:15 +02:00
|
|
|
};
|
|
|
|
stableNixpkgs = import stableNixpkgsSrc {};
|
|
|
|
|
2021-01-03 17:07:33 +01:00
|
|
|
exposed = import ./nixpkgs-exposed.nix { 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;
|
2020-05-26 02:49:01 +02:00
|
|
|
inherit (stableNixpkgs) git;
|
2020-04-04 03:26:55 +02:00
|
|
|
ffmpeg = nixpkgs.ffmpeg-full;
|
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-06-16 23:03:02 +02:00
|
|
|
# The Go authors have released a version of Go (in alpha) that has a
|
|
|
|
# type system. This makes it available, specifically for use with
|
|
|
|
# //nix/buildTypedGo.
|
2020-06-18 01:54:12 +02:00
|
|
|
go = nixpkgs.go.overrideAttrs(old: {
|
2020-06-16 23:03:02 +02:00
|
|
|
version = "dev-go2go";
|
|
|
|
doCheck = false;
|
|
|
|
patches = []; # they all don't apply and are mostly about Darwin crap
|
|
|
|
|
|
|
|
src = nixpkgs.fetchgit {
|
|
|
|
url = "https://go.googlesource.com/go";
|
|
|
|
# You might think these hashes are trivial to update. It's just
|
|
|
|
# a branch in a git repository, right?
|
|
|
|
#
|
|
|
|
# Well, think again. Somehow I managed to get no fewer than 3
|
|
|
|
# (!) different commit hashes for the same branch by cloning
|
|
|
|
# this repository thrice. Only the third one (which you, the
|
|
|
|
# reader, can find below for your reading pleasure) actually
|
|
|
|
# gave me `go tool go2go`.
|
|
|
|
rev = "ad307489d41133f32c779cfa1b0db4a852ace047";
|
|
|
|
leaveDotGit = true;
|
2020-06-18 02:27:32 +02:00
|
|
|
sha256 = "1nxmqdlyfx7w3g5vhjfq24yrc9hwpsa2mjv58xrmhh8vvy50ziqq";
|
2020-06-16 23:03:02 +02:00
|
|
|
|
|
|
|
postFetch = ''
|
|
|
|
cd $out
|
2020-06-18 02:27:32 +02:00
|
|
|
${nixpkgs.git}/bin/git log -n 1 "--format=format:devel +%H %cd" HEAD > VERSION
|
2020-06-16 23:03:02 +02:00
|
|
|
rm -rf .git
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
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
|
|
|
})
|