build: switching to Nix flake
This commit is contained in:
parent
0f83d800c9
commit
4e91e64ed8
6 changed files with 70 additions and 19 deletions
2
.envrc
2
.envrc
|
@ -1 +1 @@
|
||||||
use nix
|
use flake
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ["@commitlint/config-conventional"],
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
rules: {
|
||||||
|
"body-max-line-length": [0],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
42
flake.lock
Normal file
42
flake.lock
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1638122382,
|
||||||
|
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1638806821,
|
||||||
|
"narHash": "sha256-v2qd2Bsmzft53s43eCbN+4ocrLksRdFLyF/MAGuWuDA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "bc5d68306b40b8522ffb69ba6cff91898c2fbbff",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
17
flake.nix
Normal file
17
flake.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
description = "A .NET core library for building tools";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = [ pkgs.dotnet-sdk_5 pkgs.nodejs-16_x pkgs.nixfmt ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
branches: ["main"],
|
branches: ["main"],
|
||||||
message: "chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
message: "chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -10,7 +11,12 @@ module.exports = {
|
||||||
],
|
],
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/npm",
|
"@semantic-release/npm",
|
||||||
|
[
|
||||||
"semantic-release-dotnet",
|
"semantic-release-dotnet",
|
||||||
|
{
|
||||||
|
paths: ["src/Directory.Build.props"],
|
||||||
|
},
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"semantic-release-nuget",
|
"semantic-release-nuget",
|
||||||
{
|
{
|
||||||
|
|
17
shell.nix
17
shell.nix
|
@ -1,17 +0,0 @@
|
||||||
let
|
|
||||||
sources = import ./nix/sources.nix;
|
|
||||||
pkgs = import sources.nixpkgs {};
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.git
|
|
||||||
pkgs.nodejs-16_x
|
|
||||||
pkgs.yarn
|
|
||||||
pkgs.dotnet-sdk_5
|
|
||||||
pkgs.niv
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHooks = ''
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
|
||||||
'';
|
|
||||||
}
|
|
Reference in a new issue