mirror of
https://gitlab.com/rensa-nix/devshell.git
synced 2025-12-11 22:00:08 +01:00
chore: update rensa and use improved input handling
This commit is contained in:
parent
fbacfc149b
commit
e76bef387e
7 changed files with 70 additions and 33 deletions
1
.envrc
1
.envrc
|
|
@ -1,3 +1,2 @@
|
|||
source $(fetchurl https://gitlab.com/rensa-nix/direnv/-/raw/v0.2.0/direnvrc "sha256-PFFxlZWNz/LLuNHA1Zpu2qdC3MF+oukv/TxFj5Utixk=")
|
||||
REN_FLAKE_ATTR=__std
|
||||
use ren //repo/devShells/default
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: {
|
||||
bench = inputs.nixpkgs.writeShellApplication {
|
||||
{inputs, ...}: let
|
||||
inherit (inputs) pkgs;
|
||||
in {
|
||||
bench = pkgs.writeShellApplication {
|
||||
name = "benchmark";
|
||||
runtimeInputs = [inputs.nixpkgs.hyperfine];
|
||||
runtimeInputs = [pkgs.hyperfine];
|
||||
text = ''
|
||||
echo "Comparison cases first:"
|
||||
hyperfine -w 3 \
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
devshell = import "${inputs.self}/lib" {
|
||||
pkgs = inputs.nixpkgs;
|
||||
};
|
||||
{inputs, ...}: let
|
||||
inherit (inputs) pkgs devshell;
|
||||
in {
|
||||
default = devshell.mkShell {
|
||||
packages = [inputs.nixpkgs.alejandra];
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
];
|
||||
env."HELLO".value = "world!";
|
||||
enterShellCommands.test = {
|
||||
text = "echo Hello $HELLO";
|
||||
|
|
|
|||
|
|
@ -2,5 +2,10 @@
|
|||
inputs = {
|
||||
nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?dir=lib";
|
||||
};
|
||||
outputs = i: i;
|
||||
outputs = i:
|
||||
i
|
||||
// {
|
||||
ntlib = i.nixtest-lib.lib {inherit (i.parent) pkgs;};
|
||||
devshell = import "${i.parent.self}/lib" {inherit (i.parent) pkgs;};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
inputs,
|
||||
cell,
|
||||
}: let
|
||||
pkgs = inputs.nixpkgs;
|
||||
ntlib = inputs.nixtest-lib.lib {inherit pkgs;};
|
||||
devshell = import "${inputs.self}/lib" {inherit pkgs;};
|
||||
{inputs, ...}: let
|
||||
inherit (inputs) pkgs ntlib devshell;
|
||||
in {
|
||||
tests = ntlib.mkNixtest {
|
||||
modules = ntlib.autodiscover {dir = "${inputs.self}/tests";};
|
||||
|
|
|
|||
42
flake.lock
generated
42
flake.lock
generated
|
|
@ -60,11 +60,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1753694789,
|
||||
"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
|
||||
"lastModified": 1754498491,
|
||||
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
|
||||
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -74,6 +74,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1754184128,
|
||||
"narHash": "sha256-AjhoyBL4eSyXf01Bmc6DiuaMrJRNdWopmdnMY0Pa/M0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "02e72200e6d56494f4a7c0da8118760736e41b60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nosys": {
|
||||
"locked": {
|
||||
"lastModified": 1668010795,
|
||||
|
|
@ -117,9 +132,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ren": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1755264589,
|
||||
"narHash": "sha256-g8KjU4D/nxpMjCLQNP90VAAWUH89yvONRfChyhhzq4c=",
|
||||
"owner": "rensa-nix",
|
||||
"repo": "core",
|
||||
"rev": "9f20f8c94b09a1c85356f8340ebe0a339b0d32e6",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "rensa-nix",
|
||||
"repo": "core",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"ren": "ren",
|
||||
"std": "std"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
20
flake.nix
20
flake.nix
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
ren.url = "gitlab:rensa-nix/core?dir=lib";
|
||||
std = {
|
||||
url = "github:divnix/std";
|
||||
inputs = {
|
||||
|
|
@ -15,20 +16,25 @@
|
|||
|
||||
outputs = {
|
||||
self,
|
||||
std,
|
||||
ren,
|
||||
...
|
||||
} @ inputs:
|
||||
std.growOn
|
||||
ren.buildWith
|
||||
{
|
||||
inherit inputs;
|
||||
cellsFrom = ./.nix;
|
||||
cellBlocks = with std.blockTypes; [
|
||||
(devshells "devShells")
|
||||
(pkgs "tests")
|
||||
(runnables "benchmark")
|
||||
transformInputs = system: i:
|
||||
i
|
||||
// {
|
||||
pkgs = import i.nixpkgs {inherit system;};
|
||||
};
|
||||
cellBlocks = with ren.blocks; [
|
||||
(simple "devShells")
|
||||
(simple "tests")
|
||||
(simple "benchmark")
|
||||
];
|
||||
}
|
||||
{
|
||||
packages = std.harvest self [["repo" "tests"] ["repo" "benchmark"]];
|
||||
packages = ren.select self [["repo" "tests"] ["repo" "benchmark"]];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue