mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-26 23:47:43 +00:00
Depend on nixpkgs.lib
This commit is contained in:
parent
682ed00b4f
commit
86ba79747d
3 changed files with 31 additions and 5 deletions
|
@ -1,8 +1,6 @@
|
|||
# Taken from https://github.com/nrabulinski/cursed-nix. Huge thanks!
|
||||
|
||||
let
|
||||
lib = (import <nixpkgs> {}).lib;
|
||||
|
||||
lib: let
|
||||
startMarker = "__START__";
|
||||
endMarker = "__END__";
|
||||
|
||||
|
|
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"lib": {
|
||||
"locked": {
|
||||
"lastModified": 1708821942,
|
||||
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "479831ed8b3c9c7b80533999f880c7d0bf6a491b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"lib": "lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,14 +1,16 @@
|
|||
{
|
||||
description = "Write composeable HTML with Nix!";
|
||||
|
||||
outputs = { self }: let
|
||||
inputs.lib.url = "github:nix-community/nixpkgs.lib";
|
||||
|
||||
outputs = { self, lib }: let
|
||||
first = n: builtins.substring 0 n;
|
||||
dropFirst = n: string: builtins.substring n (builtins.stringLength string - n) string;
|
||||
|
||||
last = n: string: builtins.substring (builtins.stringLength string - n) n string;
|
||||
dropLast = n: string: builtins.substring 0 (builtins.stringLength string - n) string;
|
||||
|
||||
escapix = import ./escape.nix;
|
||||
escapix = import ./escape.nix lib.lib;
|
||||
inherit (escapix) escape;
|
||||
|
||||
attrsetToHtmlAttrs = attrs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue