add flake
This commit is contained in:
parent
73ffdfd63a
commit
eac632d0cc
7 changed files with 95 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
.direnv
|
||||
<<<<<<< HEAD
|
||||
||||||| parent of 2ccfcd1 (fixup flake)
|
||||
testgit
|
||||
*.swp
|
||||
=======
|
||||
testgit
|
||||
*.swp
|
||||
result
|
||||
>>>>>>> 2ccfcd1 (fixup flake)
|
39
flake.lock
generated
Normal file
39
flake.lock
generated
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1652776076,
|
||||
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-GNay7yDPtLcRcKCNHldug85AhAvBpTtPEJWSSDYBw8U=",
|
||||
"path": "/nix/store/yyddvwq452qsvpgb104mllpq0hkkmsqx-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
flake.nix
Normal file
29
flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "Flake utils demo";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
rec {
|
||||
packages = flake-utils.lib.flattenTree {
|
||||
hello = pkgs.callPackage ./nix { pkgs = pkgs; };
|
||||
gitAndTools = pkgs.gitAndTools;
|
||||
};
|
||||
defaultPackage = packages.pad-archiver;
|
||||
apps.pad-archiver = flake-utils.lib.mkApp { drv = packages.pad-archiver; };
|
||||
defaultApp = apps.pad-archiver;
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
gotools
|
||||
go-tools
|
||||
go-langserver
|
||||
gopls
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module git.fginfo.tu-bs.de/fginfo/pad-archiver
|
||||
|
||||
go 1.17
|
13
nix/default.nix
Normal file
13
nix/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, lib, buildGoModule }:
|
||||
buildGoModule {
|
||||
pname = "pad-archiver";
|
||||
version = "0.0.1";
|
||||
src = ../.;
|
||||
vendorSha256 = "sha256-e9I2mhSjLxMuCO9+g13XbDYI15Q879iG1AGZv6otuEA=";
|
||||
meta = with lib; {
|
||||
description = "Archives Etherpads with git";
|
||||
homepage = "https://git.fginfo.tu-bs.de/fginfo/pad-archiver";
|
||||
license = licenses.mit;
|
||||
maintainers = [ "y0067212" ];
|
||||
};
|
||||
}
|
BIN
pad-archiver
Executable file
BIN
pad-archiver
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue