forked from lix-project/nixos-module
Compare commits
11 commits
93ce1e3f5d
...
4a9e59753a
Author | SHA1 | Date | |
---|---|---|---|
Ilya K | 4a9e59753a | ||
Qyriad | 71f268f215 | ||
Qyriad | 1c91fbff0d | ||
eldritch horrors | a8a1c6a24b | ||
eldritch horrors | 376093813b | ||
Qyriad | a3b8ac2414 | ||
jade | 9babd8172a | ||
jade | 958a5a474b | ||
Qyriad | 6804fe0ec5 | ||
Qyriad | bf047623b5 | ||
Ilya K | f425f32a62 |
|
@ -51,11 +51,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712180067,
|
"lastModified": 1713222580,
|
||||||
"narHash": "sha256-XU32CuKt0wXB8Ws5P3pZFMlYIMVx9om1GycYpITAwZ0=",
|
"narHash": "sha256-wWUZtNf1mSaO8B9mYWSR0AoYVQhryTZIW+b1yIYkAcs=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "89c31953c58d8089c85ae7ab43a5c59bb0f9f69b",
|
"rev": "866c76c7f93442993eb84b4268811bc101b4d447",
|
||||||
"revCount": 15311,
|
"revCount": 15403,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.lix.systems/lix-project/lix.git"
|
"url": "ssh://git@git.lix.systems/lix-project/lix.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,8 +23,10 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
packages.default = pkgs.nixVersions.nix_2_18;
|
packages = {
|
||||||
packages.nix-doc = pkgs.nix-doc;
|
default = pkgs.nixVersions.nix_2_18;
|
||||||
|
inherit (pkgs) nix-doc nix-eval-jobs;
|
||||||
|
};
|
||||||
|
|
||||||
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
|
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
|
||||||
});
|
});
|
||||||
|
|
47
npins/default.nix
Normal file
47
npins/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Generated by npins. Do not modify; will be overwritten regularly
|
||||||
|
let
|
||||||
|
data = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||||
|
version = data.version;
|
||||||
|
|
||||||
|
mkSource = spec:
|
||||||
|
assert spec ? type; let
|
||||||
|
path =
|
||||||
|
if spec.type == "Git" then mkGitSource spec
|
||||||
|
else if spec.type == "GitRelease" then mkGitSource spec
|
||||||
|
else if spec.type == "PyPi" then mkPyPiSource spec
|
||||||
|
else if spec.type == "Channel" then mkChannelSource spec
|
||||||
|
else builtins.throw "Unknown source type ${spec.type}";
|
||||||
|
in
|
||||||
|
spec // { outPath = path; };
|
||||||
|
|
||||||
|
mkGitSource = { repository, revision, url ? null, hash, ... }:
|
||||||
|
assert repository ? type;
|
||||||
|
# At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository
|
||||||
|
# In the latter case, there we will always be an url to the tarball
|
||||||
|
if url != null then
|
||||||
|
(builtins.fetchTarball {
|
||||||
|
inherit url;
|
||||||
|
sha256 = hash; # FIXME: check nix version & use SRI hashes
|
||||||
|
})
|
||||||
|
else assert repository.type == "Git"; builtins.fetchGit {
|
||||||
|
url = repository.url;
|
||||||
|
rev = revision;
|
||||||
|
# hash = hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkPyPiSource = { url, hash, ... }:
|
||||||
|
builtins.fetchurl {
|
||||||
|
inherit url;
|
||||||
|
sha256 = hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkChannelSource = { url, hash, ... }:
|
||||||
|
builtins.fetchTarball {
|
||||||
|
inherit url;
|
||||||
|
sha256 = hash;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
if version == 3 then
|
||||||
|
builtins.mapAttrs (_: mkSource) data.pins
|
||||||
|
else
|
||||||
|
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"
|
16
npins/sources.json
Normal file
16
npins/sources.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"pins": {
|
||||||
|
"nix-eval-jobs": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "Git",
|
||||||
|
"url": "git+ssh://git@git.lix.systems/lix-project/nix-eval-jobs"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"revision": "793841a9b7b689e37c9a7902710aab2bd6a833d5",
|
||||||
|
"url": null,
|
||||||
|
"hash": "1pkb7glscd6dkfjf7x1cj51l21k09wjw5mzm32j37yrln5f20il5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": 3
|
||||||
|
}
|
54
overlay.nix
54
overlay.nix
|
@ -15,45 +15,45 @@ let
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
# Internal nix-doc used by Lix.
|
lixPkg = (final.callPackage (lix + "/package.nix") {
|
||||||
lix-doc = final.callPackage (lix + "/nix-doc/package.nix") { };
|
build-release-notes = false;
|
||||||
|
versionSuffix = "-lix${versionSuffix}";
|
||||||
|
boehmgc-nix = boehmgc-patched;
|
||||||
|
}).overrideAttrs {
|
||||||
|
# Note: load-bearing version override. Nixpkgs does version detection to determine
|
||||||
|
# what commands and whatnot we support, so tell Nixpkgs that we're 2.18 (ish).
|
||||||
|
version = "2.18.3-lix${versionSuffix}";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# used for things that one wouldn't necessarily want to update, but we
|
||||||
|
# nevertheless shove it in the overlay and fixed-point it in case one *does*
|
||||||
|
# want to do that.
|
||||||
|
lix-sources = import ./npins;
|
||||||
|
|
||||||
nixVersions = prev.nixVersions // rec {
|
nixVersions = prev.nixVersions // rec {
|
||||||
# FIXME: do something less scuffed
|
# FIXME: do something less scuffed
|
||||||
nix_2_18 = (prev.nixVersions.nix_2_18.override { boehmgc = boehmgc-patched; }).overrideAttrs (old: {
|
nix_2_18 = lixPkg;
|
||||||
src = lix;
|
|
||||||
# FIXME: fake version so that nixpkgs will not try to use nix config >_>
|
|
||||||
version = "2.18.3-lix${versionSuffix}";
|
|
||||||
VERSION_SUFFIX = "-lix${versionSuffix}";
|
|
||||||
|
|
||||||
# We only include CMake so that Meson can locate toml11, which only ships CMake dependency metadata.
|
|
||||||
dontUseCmakeConfigure = true;
|
|
||||||
|
|
||||||
patches = [ ];
|
|
||||||
buildInputs = old.buildInputs or [ ] ++ [
|
|
||||||
final.toml11
|
|
||||||
lix-doc
|
|
||||||
];
|
|
||||||
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
|
|
||||||
final.buildPackages.cmake
|
|
||||||
# FIXME: we don't know why this was not being picked up properly when
|
|
||||||
# included in nativeCheckInputs.
|
|
||||||
final.buildPackages.git
|
|
||||||
final.buildPackages.python3
|
|
||||||
];
|
|
||||||
});
|
|
||||||
stable = nix_2_18;
|
stable = nix_2_18;
|
||||||
nix_2_18_upstream = prev.nixVersions.nix_2_18;
|
nix_2_18_upstream = prev.nixVersions.nix_2_18;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix-eval-jobs = (prev.nix-eval-jobs.override {
|
||||||
|
# lix
|
||||||
|
nix = final.nixVersions.nix_2_18;
|
||||||
|
}).overrideAttrs (old: {
|
||||||
|
# FIXME: should this be patches instead?
|
||||||
|
src = final.lix-sources.nix-eval-jobs;
|
||||||
|
|
||||||
|
mesonBuildType = "debugoptimized";
|
||||||
|
|
||||||
|
ninjaFlags = old.ninjaFlags or [ ] ++ [ "-v" ];
|
||||||
|
});
|
||||||
|
|
||||||
# force these onto upstream so we are not regularly rebuilding electron
|
# force these onto upstream so we are not regularly rebuilding electron
|
||||||
prefetch-yarn-deps = prev.prefetch-yarn-deps.override {
|
prefetch-yarn-deps = prev.prefetch-yarn-deps.override {
|
||||||
nix = final.nixVersions.nix_2_18_upstream;
|
nix = final.nixVersions.nix_2_18_upstream;
|
||||||
};
|
};
|
||||||
prefetch-npm-deps = prev.prefetch-npm-deps.override {
|
|
||||||
nix = final.nixVersions.nix_2_18_upstream;
|
|
||||||
};
|
|
||||||
nix-prefetch-git = prev.nix-prefetch-git.override {
|
nix-prefetch-git = prev.nix-prefetch-git.override {
|
||||||
nix = final.nixVersions.nix_2_18_upstream;
|
nix = final.nixVersions.nix_2_18_upstream;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue