convert to flake
This commit is contained in:
42
flake.lock
generated
Normal file
42
flake.lock
generated
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677608380,
|
||||
"narHash": "sha256-k82O23qBAK+43X0KSBjsMYXG2x4kWWXeAmpPTc2KRGY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4aba90e89f6d4ac6138939961f62842bd94ec929",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
28
flake.nix
Normal file
28
flake.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
description = "nix library extension, containing sophisticated script and code generator functions";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}: let
|
||||
nix-writersOverlay = import ./pkgs;
|
||||
in
|
||||
{
|
||||
overlays = {
|
||||
nix-writers = nix-writersOverlay;
|
||||
default = nix-writersOverlay;
|
||||
};
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
nix-writers = nix-writersOverlay pkgs pkgs;
|
||||
in {
|
||||
legacyPackages = nix-writers;
|
||||
});
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{ nixpkgs }:
|
||||
let {
|
||||
body = lib;
|
||||
|
||||
@@ -19,6 +20,4 @@ let {
|
||||
testString = re: x: match re x != null;
|
||||
types = nixpkgs.lib.types // import ./types.nix { lib = body; };
|
||||
});
|
||||
|
||||
nixpkgs.lib = import <nixpkgs/lib>;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
# nix-build hello_world.nix.
|
||||
#
|
||||
|
||||
with import ../lib;
|
||||
|
||||
pkgs: oldpkgs: {
|
||||
pkgs: oldpkgs:
|
||||
with import ../lib { nixpkgs = pkgs; };
|
||||
{
|
||||
exec = name: { filename, argv ? null, envp ? null, destination ? "" }:
|
||||
pkgs.writeC name { inherit destination; } /* c */ ''
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user