Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
Signed-off-by: Horiodino <[email protected]>
  • Loading branch information
Horiodino committed Jun 2, 2024
1 parent 2e20fc3 commit db96440
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 129 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
uses: cachix/install-nix-action@v17

- name: Install Task
uses: arduino/setup-task@v1
uses: nicknovitski/nix-develop@v1
with:
arguments: "bsf/.#devShell"

- name: go test
run: nix develop bsf/.#devShell --command task test

- name: go lint
run: nix develop bsf/.#devShell --command task lint
run: task test
14 changes: 0 additions & 14 deletions .golangci.yml

This file was deleted.

5 changes: 0 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,3 @@ tasks:
desc: "Run all Go tests"
cmds:
- go test ./...

lint:
desc: "Run golangci-lint"
cmds:
- golangci-lint run
2 changes: 1 addition & 1 deletion bsf.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

packages {
development = ["[email protected]", "[email protected]", "[email protected]", "go-task@~3.37.2", "golangci-lint@~1.59.0"]
development = ["[email protected]", "[email protected]", "[email protected]", "go-task@~3.37.2"]
runtime = ["[email protected]"]
}

Expand Down
147 changes: 52 additions & 95 deletions bsf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"packages": [
{
"package": {
"name": "go",
"name": "delve",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.21.6",
"description": "The Go Programming language",
"homepage": "https://go.dev/",
"version": "1.22.0",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"free": true,
"spdx_id": "BSD-3-Clause",
"spdx_id": "MIT",
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
Expand Down Expand Up @@ -43,89 +43,6 @@
},
"runtime": false
},
{
"package": {
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
"armv7a-linux",
"armv7l-linux",
"i686-linux",
"loongarch64-linux",
"m68k-linux",
"microblaze-linux",
"microblazeel-linux",
"mips-linux",
"mips64-linux",
"mips64el-linux",
"mipsel-linux",
"powerpc64-linux",
"powerpc64le-linux",
"riscv32-linux",
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
},
"runtime": false
},
{
"package": {
"name": "golangci-lint",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "1.59.0",
"description": "Fast linters Runner for Go",
"homepage": "https://golangci-lint.run/",
"free": true,
"spdx_id": "GPL-3.0-or-later",
"epoch_seconds": 1716993062,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
"armv7a-linux",
"armv7l-linux",
"i686-linux",
"loongarch64-linux",
"m68k-linux",
"microblaze-linux",
"microblazeel-linux",
"mips-linux",
"mips64-linux",
"mips64el-linux",
"mipsel-linux",
"powerpc64-linux",
"powerpc64le-linux",
"riscv32-linux",
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "golangci-lint"
},
"runtime": false
},
{
"package": {
"name": "go-task",
Expand Down Expand Up @@ -171,14 +88,14 @@
},
{
"package": {
"name": "delve",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.22.0",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "MIT",
"epoch_seconds": 1705066566,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand Down Expand Up @@ -298,6 +215,46 @@
]
},
"runtime": true
},
{
"package": {
"name": "go",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.21.6",
"description": "The Go Programming language",
"homepage": "https://go.dev/",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
"armv7a-linux",
"armv7l-linux",
"i686-linux",
"loongarch64-linux",
"m68k-linux",
"microblaze-linux",
"microblazeel-linux",
"mips-linux",
"mips64-linux",
"mips64el-linux",
"mipsel-linux",
"powerpc64-linux",
"powerpc64le-linux",
"riscv32-linux",
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
},
"runtime": false
}
]
}
16 changes: 7 additions & 9 deletions bsf/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
description = "";

inputs = {
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746.url = "github:nixos/nixpkgs/a731d0cb71c58f56895f71a5b02eda2962a46746";
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14.url = "github:nixos/nixpkgs/ac5c1886fd9fe49748d7ab80accc4c847481df14";
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746.url = "github:nixos/nixpkgs/a731d0cb71c58f56895f71a5b02eda2962a46746";
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4.url = "github:nixos/nixpkgs/7445ccd775d8b892fc56448d17345443a05f7fb4";

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
Expand All @@ -26,8 +26,8 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4,
}: let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
Expand All @@ -36,8 +36,8 @@
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
inherit system;

nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs = import nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746 { inherit system; };
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs = import nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14 { inherit system; };
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs = import nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746 { inherit system; };
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs = import nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4 { inherit system; };

buildGoApplication = gomod2nix.legacyPackages.${system}.buildGoApplication;
Expand All @@ -50,8 +50,8 @@
buildGoApplication,


nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs,
... }: {
default = pkgs.callPackage ./default.nix {
Expand All @@ -68,8 +68,8 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs,
... }: {
devShell = pkgs.mkShell {
Expand All @@ -78,7 +78,6 @@
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.golangci-lint
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
Expand All @@ -90,7 +89,7 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
runtime = pkgs.buildEnv {
name = "runtimeenv";
paths = [
Expand All @@ -105,14 +104,13 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
development = pkgs.buildEnv {
name = "devenv";
paths = [
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.golangci-lint
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
Expand Down

0 comments on commit db96440

Please sign in to comment.