Compare commits
5 Commits
stable
...
wip/flake-
Author | SHA1 | Date | |
---|---|---|---|
05649d1a22 | |||
cc5d706c1b | |||
eedc1170ec | |||
5a586c6e3c | |||
371bcad650 |
43
flake.lock
generated
43
flake.lock
generated
@@ -56,11 +56,12 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-unpatched"
|
"nixpkgs-unpatched"
|
||||||
]
|
],
|
||||||
|
"patches": []
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-FaeqnQPm3MIXkQsNsGTB4A9lN82YKpLkmVHgdJyJNGg=",
|
"narHash": "sha256-d3XSehPFkNwvwlOYy7gch0NLxOgdXuV7j5r/Qsn7kHc=",
|
||||||
"path": "nixpatches",
|
"path": "nixpatches",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
@@ -71,26 +72,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673612960,
|
"lastModified": 1673704454,
|
||||||
"narHash": "sha256-DWR7hrbecJKmUJCswk9MXZta710mq+3jZwTvHU/UfyY=",
|
"narHash": "sha256-5Wdj1MgdOgn3+dMFIBtg+IAYZApjF8JzwLWDPieg0C4=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e285dd0ca97c264003867c7329f0d1f4f028739c",
|
"rev": "a83ed85c14fcf242653df6f4b0974b7e1c73c6c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"ref": "nixos-22.11",
|
"ref": "nixos-22.11",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673100377,
|
"lastModified": 1673740915,
|
||||||
"narHash": "sha256-mT76pTd0YFxT6CwtPhDgHJhuIgLY+ZLSMiQpBufwMG4=",
|
"narHash": "sha256-MMH8zONfqahgHly3K8/A++X34800rajA/XgZ2DzNL/M=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9f11a2df77cb945c115ae2a65f53f38121597d73",
|
"rev": "7c65528c3f8462b902e09d1ccca23bb9034665c2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -102,17 +104,18 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unpatched": {
|
"nixpkgs-unpatched": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673540789,
|
"lastModified": 1673631141,
|
||||||
"narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
|
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
|
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
@@ -134,11 +137,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673481602,
|
"lastModified": 1673752321,
|
||||||
"narHash": "sha256-P80X38fOM2MtoYdgkyuksGOQPDhIhNJW2W2jMeMIZzE=",
|
"narHash": "sha256-EFfXY1ZHJq4FNaNQA9x0djtu/jiOhBbT0Xi+BT06cJw=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "32187b33ac6ec9b628dcd08dd941a715e6241dda",
|
"rev": "e18eefd2b133a58309475298052c341c08470717",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
41
flake.nix
41
flake.nix
@@ -1,33 +1,47 @@
|
|||||||
# FLAKE FEEDBACK:
|
# FLAKE FEEDBACK:
|
||||||
# - flake input url schemes (like `github:nixos/nixpkgs`, or `nixpkgs/nixos-22.11`) are confusing and opaque.
|
# - if flake inputs are meant to be human-readable, a human should be able to easily track them down given the URL.
|
||||||
# - use established URI formats like https://github.com/<owner>/<repo>.
|
# - this is not the case with registry URLs, like `nixpkgs/nixos-22.11`.
|
||||||
# - or reuse `fetchGit*` idioms from nixpkgs.
|
# - this is marginally the case with schemes like `github:nixos/nixpkgs`.
|
||||||
# - but please don't just invent something new.
|
# - given the *existing* `git+https://` scheme, i propose expressing github URLs similarly:
|
||||||
# - need a way to apply local patches to inputs.
|
# - `github+https://github.com/nixos/nixpkgs/tree/nixos-22.11`
|
||||||
# - this could be part of the `inputs` proper, or something like `builtins.applyPatches`.
|
# - need some way to apply local patches to inputs.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# DEVELOPMENT DOCS:
|
# DEVELOPMENT DOCS:
|
||||||
# - <https://nixos.wiki/wiki/Flakes>
|
# - Flake docs: <https://nixos.wiki/wiki/Flakes>
|
||||||
|
# - Flake RFC: <https://github.com/tweag/rfcs/blob/flakes/rfcs/0049-flakes.md>
|
||||||
|
# - Discussion: <https://github.com/NixOS/rfcs/pull/49>
|
||||||
# - <https://serokell.io/blog/practical-nix-flakes>
|
# - <https://serokell.io/blog/practical-nix-flakes>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# XXX: use the `github:` scheme instead of the more readable git+https: because it's *way* more efficient
|
||||||
|
# preferably, i would rewrite the human-readable https URLs to nix-specific github: URLs with a helper,
|
||||||
|
# but `inputs` is required to be a strict attrset: not an expression.
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs-stable.url = "nixpkgs/nixos-22.11";
|
# <https://github.com/nixos/nixpkgs/tree/nixos-22.11>
|
||||||
nixpkgs-unpatched.url = "nixpkgs/nixos-unstable";
|
nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-22.11";
|
||||||
|
|
||||||
|
# <https://github.com/nixos/nixpkgs/tree/nixos-unstable>
|
||||||
|
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "path:nixpatches";
|
url = "path:nixpatches";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unpatched";
|
inputs.nixpkgs.follows = "nixpkgs-unpatched";
|
||||||
|
# XXX: `path:` urls have poor UX in that they still get "locked" and require manual updates as if they were remote.
|
||||||
|
# by linking back to ourselves here, we can update `nixpatches/list.nix` *without* having to run `nix flake update` afterward.
|
||||||
|
inputs.patches.follows = "";
|
||||||
};
|
};
|
||||||
mobile-nixos = {
|
mobile-nixos = {
|
||||||
|
# <https://github.com/nixos/mobile-nixos>
|
||||||
url = "github:nixos/mobile-nixos";
|
url = "github:nixos/mobile-nixos";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-22.05";
|
# <https://github.com/nix-community/home-manager/tree/release-22.05>
|
||||||
|
url = "github:nix-community/home-manager?ref=release-22.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
|
# <https://github.com/Mic92/sops-nix>
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@@ -71,6 +85,7 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
self.overlays.passthru
|
self.overlays.passthru
|
||||||
|
self.overlays.pins
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -108,10 +123,11 @@
|
|||||||
overlays = rec {
|
overlays = rec {
|
||||||
default = pkgs;
|
default = pkgs;
|
||||||
pkgs = import ./overlays/pkgs.nix;
|
pkgs = import ./overlays/pkgs.nix;
|
||||||
|
pins = import ./overlays/pins.nix; # TODO: move to `nixpatches/` input
|
||||||
passthru =
|
passthru =
|
||||||
let
|
let
|
||||||
stable = next: prev: {
|
stable = next: prev: {
|
||||||
stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform}";
|
stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform.system}";
|
||||||
};
|
};
|
||||||
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
|
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
|
||||||
uninsane = uninsane-dot-org.overlay;
|
uninsane = uninsane-dot-org.overlay;
|
||||||
@@ -172,6 +188,9 @@
|
|||||||
description = "python environment for data processing";
|
description = "python environment for data processing";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# unofficial output; used by inputs.nixpatches
|
||||||
|
nixpatches = import ./nixpatches/list.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
nixpkgs = {};
|
||||||
|
patches = {};
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs, patches }@inputs:
|
||||||
let
|
let
|
||||||
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
|
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
|
||||||
name = "nixpkgs-patched-uninsane";
|
name = "nixpkgs-patched-uninsane";
|
||||||
src = nixpkgs;
|
src = nixpkgs;
|
||||||
patches = import ./list.nix {
|
patches = inputs.patches.nixpatches {
|
||||||
inherit (nixpkgs.legacyPackages.${system}) fetchpatch;
|
inherit (nixpkgs.legacyPackages.${system}) fetchpatch;
|
||||||
inherit (nixpkgs.lib) fakeHash;
|
inherit (nixpkgs.lib) fakeHash;
|
||||||
};
|
};
|
||||||
|
@@ -13,12 +13,6 @@
|
|||||||
sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc=";
|
sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc=";
|
||||||
})
|
})
|
||||||
|
|
||||||
# kiwix-tools: init at 3.4.0
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/pull/206254.diff";
|
|
||||||
sha256 = "sha256-Cendm7a23qj/YRBj5qVM8jhl9oTpztaDEkXcSG4dJys=";
|
|
||||||
})
|
|
||||||
|
|
||||||
# whalebird: 4.6.5 -> 4.7.4
|
# whalebird: 4.6.5 -> 4.7.4
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
# url = "https://git.uninsane.org/colin/nixpkgs/compare/master...pr.whalebird-4.7.4.diff";
|
# url = "https://git.uninsane.org/colin/nixpkgs/compare/master...pr.whalebird-4.7.4.diff";
|
||||||
|
24
overlays/pins.nix
Normal file
24
overlays/pins.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
(next: prev: {
|
||||||
|
inherit (next.stable)
|
||||||
|
# TODO(unpin): broken on 2023/01/14 via mtxclient dep, aarch64-only:
|
||||||
|
# error: builder for '/nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv' failed with exit code 2;
|
||||||
|
# last 10 log lines:
|
||||||
|
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:370: CMakeFiles/matrix_client.dir/lib/structs/events/encrypted.cpp.o] Error 1
|
||||||
|
# > In file included from /build/source/include/mtxclient/crypto/client.hpp:17,
|
||||||
|
# > from /build/source/lib/crypto/utils.cpp:17:
|
||||||
|
# > /build/source/include/mtx/identifiers.hpp:12:10: fatal error: compare: No such file or directory
|
||||||
|
# > 12 | #include <compare>
|
||||||
|
# > | ^~~~~~~~~
|
||||||
|
# > compilation terminated.
|
||||||
|
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:132: CMakeFiles/matrix_client.dir/lib/crypto/utils.cpp.o] Error 1
|
||||||
|
# > make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/matrix_client.dir/all] Error 2
|
||||||
|
# > make: *** [Makefile:136: all] Error 2
|
||||||
|
# For full logs, run 'nix log /nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv'.
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/4i2d1qdh4x6n23h1jbcbhm8q9q2hch9a-nheko-0.11.0.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/k4f7k7cvjp8rb7clhlfq3yxgs6lbfmk7-home-manager-path.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/67d9k554188lh4ddl4ar6j74mpc3r4sv-home-manager-generation.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/5qjxzhsw1jvh2d7jypbcam9409ivb472-user-environment.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/hrb3qpdbisqh0lzlyz1g9g4164khmqwn-etc.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/ny21xyicbgim5wy7ksg2hibd9gn7i01b-nixos-system-moby-23.05pre-git.drv' failed to build
|
||||||
|
nheko;
|
||||||
|
})
|
Reference in New Issue
Block a user