mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-25 06:57:43 +00:00
Fix scopedImport
This commit is contained in:
parent
76c9a74f8b
commit
c7ee85d111
2 changed files with 6 additions and 6 deletions
4
flake.lock
generated
4
flake.lock
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"lib": {
|
"nixpkgslib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708821942,
|
"lastModified": 1708821942,
|
||||||
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"lib": "lib"
|
"nixpkgslib": "nixpkgslib"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
description = "Write composeable HTML with Nix!";
|
description = "Write composeable HTML with Nix!";
|
||||||
|
|
||||||
inputs.lib.url = "github:nix-community/nixpkgs.lib";
|
inputs.nixpkgslib.url = "github:nix-community/nixpkgs.lib";
|
||||||
|
|
||||||
outputs = { self, lib }: let
|
outputs = { self, nixpkgslib }: let
|
||||||
first = n: builtins.substring 0 n;
|
first = n: builtins.substring 0 n;
|
||||||
dropFirst = n: string: builtins.substring n (builtins.stringLength string - n) string;
|
dropFirst = n: string: builtins.substring n (builtins.stringLength string - n) string;
|
||||||
|
|
||||||
last = n: string: builtins.substring (builtins.stringLength string - n) n string;
|
last = n: string: builtins.substring (builtins.stringLength string - n) n string;
|
||||||
dropLast = n: string: builtins.substring 0 (builtins.stringLength string - n) string;
|
dropLast = n: string: builtins.substring 0 (builtins.stringLength string - n) string;
|
||||||
|
|
||||||
escapix = import ./escape.nix lib.lib;
|
escapix = import ./escape.nix nixpkgslib.lib;
|
||||||
inherit (escapix) escape;
|
inherit (escapix) escape;
|
||||||
|
|
||||||
attrsetToHtmlAttrs = attrs:
|
attrsetToHtmlAttrs = attrs:
|
||||||
|
@ -74,6 +74,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
result = builtins.scopedImport { inherit (self) raw __findFile; inherit lib; } /${builtins.getEnv "TARGET_FILE"};
|
result = builtins.scopedImport { inherit (self) raw __findFile; inherit (nixpkgslib) lib; } /${builtins.getEnv "TARGET_FILE"};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue