Skip to content

Commit ebb2be4

Browse files
committed
🚧 Nix で go-task を導入したい、けどソースビルドでコケる
1 parent e25e9e7 commit ebb2be4

4 files changed

Lines changed: 24 additions & 1 deletion

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ indent_size = 4
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[*.{json,yml,yaml}]
10+
[*.{json,nix,yml,yaml}]
1111
indent_size = 2

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_nix

nix/go-task.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{ buildGoModule, fetchFromGitHub }:
2+
buildGoModule rec {
3+
pname = "go-task";
4+
version = "3.19.1";
5+
6+
src = fetchFromGitHub {
7+
rev = "v${version}";
8+
owner = "go-task";
9+
repo = "task";
10+
sha256 = "sha256-MtbgFx/+SVBcV6Yp1WEwKLQGx5oPxvqljtXeyUYNS+I=";
11+
};
12+
13+
# FIXME: compute vendor hash in order to fetch dependencies into vendor directory
14+
vendorHash = null;
15+
}

shell.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
let goTask = pkgs.callPackage ./nix/go-task.nix {}; in
3+
pkgs.mkShell {
4+
buildInputs = [
5+
goTask
6+
];
7+
}

0 commit comments

Comments
 (0)