forked from lix-project/nixos-module
Compare commits
No commits in common. "4a9e59753a82773f367d9f51d2970c47ccc07bd7" and "93ce1e3f5defd0091a1da2b1964a89a748257ada" have entirely different histories.
4a9e59753a
...
93ce1e3f5d
|
@ -51,11 +51,11 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713222580,
|
||||
"narHash": "sha256-wWUZtNf1mSaO8B9mYWSR0AoYVQhryTZIW+b1yIYkAcs=",
|
||||
"lastModified": 1712180067,
|
||||
"narHash": "sha256-XU32CuKt0wXB8Ws5P3pZFMlYIMVx9om1GycYpITAwZ0=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "866c76c7f93442993eb84b4268811bc101b4d447",
|
||||
"revCount": 15403,
|
||||
"rev": "89c31953c58d8089c85ae7ab43a5c59bb0f9f69b",
|
||||
"revCount": 15311,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.lix.systems/lix-project/lix.git"
|
||||
},
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
in
|
||||
{
|
||||
inherit pkgs;
|
||||
packages = {
|
||||
default = pkgs.nixVersions.nix_2_18;
|
||||
inherit (pkgs) nix-doc nix-eval-jobs;
|
||||
};
|
||||
packages.default = pkgs.nixVersions.nix_2_18;
|
||||
packages.nix-doc = pkgs.nix-doc;
|
||||
|
||||
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
|
||||
});
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# 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`"
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"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
|
|||
})
|
||||
);
|
||||
|
||||
lixPkg = (final.callPackage (lix + "/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}";
|
||||
};
|
||||
# Internal nix-doc used by Lix.
|
||||
lix-doc = final.callPackage (lix + "/nix-doc/package.nix") { };
|
||||
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 {
|
||||
# FIXME: do something less scuffed
|
||||
nix_2_18 = lixPkg;
|
||||
nix_2_18 = (prev.nixVersions.nix_2_18.override { boehmgc = boehmgc-patched; }).overrideAttrs (old: {
|
||||
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;
|
||||
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
|
||||
prefetch-yarn-deps = prev.prefetch-yarn-deps.override {
|
||||
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 = final.nixVersions.nix_2_18_upstream;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue