2022-01-07 19:53:26 +00:00
|
|
|
{ pkgs ? (
|
|
|
|
let
|
|
|
|
inherit (builtins) fromJSON readFile;
|
|
|
|
flakeLock = fromJSON (readFile ./flake.lock);
|
|
|
|
locked = flakeLock.nodes.nixpkgs.locked;
|
|
|
|
nixpkgs = assert locked.type == "github"; builtins.fetchTarball {
|
|
|
|
url = "https://github.com/${locked.owner}/${locked.repo}/archive/${locked.rev}.tar.gz";
|
|
|
|
sha256 = locked.narHash;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
import nixpkgs { }
|
|
|
|
)
|
2021-09-25 03:12:56 +00:00
|
|
|
, srcDir ? null
|
2022-05-09 07:20:56 +00:00
|
|
|
, nix
|
2021-09-25 03:12:56 +00:00
|
|
|
}:
|
|
|
|
|
2022-04-22 06:42:17 +00:00
|
|
|
let
|
|
|
|
inherit (pkgs) lib stdenv;
|
|
|
|
|
|
|
|
in
|
|
|
|
(pkgs.callPackage ./default.nix {
|
2022-05-09 07:20:56 +00:00
|
|
|
inherit srcDir nix;
|
2022-01-07 19:53:59 +00:00
|
|
|
}).overrideAttrs (old: {
|
2021-09-25 03:12:56 +00:00
|
|
|
|
2022-01-08 22:05:43 +00:00
|
|
|
src = null;
|
|
|
|
|
2021-09-25 03:12:56 +00:00
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
|
2022-04-26 08:48:39 +00:00
|
|
|
pkgs.treefmt
|
2022-04-26 09:04:54 +00:00
|
|
|
pkgs.llvmPackages.clang # clang-format
|
2021-09-25 03:17:06 +00:00
|
|
|
pkgs.nixpkgs-fmt
|
2022-04-26 09:34:51 +00:00
|
|
|
pkgs.nodePackages.prettier
|
2021-09-25 03:17:06 +00:00
|
|
|
|
|
|
|
(pkgs.python3.withPackages (ps: [
|
2021-09-25 03:12:56 +00:00
|
|
|
ps.pytest
|
2022-04-26 09:36:48 +00:00
|
|
|
ps.black
|
2021-09-25 03:12:56 +00:00
|
|
|
]))
|
|
|
|
|
|
|
|
];
|
|
|
|
|
2022-04-26 09:34:51 +00:00
|
|
|
NODE_PATH = "${pkgs.nodePackages.prettier-plugin-toml}/lib/node_modules";
|
|
|
|
|
2022-04-22 06:42:17 +00:00
|
|
|
shellHook = lib.optionalString stdenv.isLinux ''
|
|
|
|
export NIX_DEBUG_INFO_DIRS="${pkgs.curl.debug}/lib/debug:${nix.debug}/lib/debug''${NIX_DEBUG_INFO_DIRS:+:$NIX_DEBUG_INFO_DIRS}"
|
2022-04-21 17:12:22 +00:00
|
|
|
'';
|
2021-09-25 03:12:56 +00:00
|
|
|
})
|