Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Evertras committed Feb 2, 2024
1 parent 27d04e1 commit 1a0b77f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 36 deletions.
17 changes: 6 additions & 11 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{ pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locks) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
];
}
), buildGoApplication ? pkgs.buildGoApplication }:
{ pkgs ? (let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in import (fetchTree nixpkgs.locks) {
overlays = [ (import "${fetchTree gomod2nix.locked}/overlay.nix") ];
}), buildGoApplication ? pkgs.buildGoApplication }:
buildGoApplication {
pname = "yakdash";
version = "0.1";
Expand Down
8 changes: 2 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
callPackage =
pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
in {
packages.default = callPackage ./default.nix {
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
Expand Down
26 changes: 8 additions & 18 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
{ pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
];
}
)
, mkGoEnv ? pkgs.mkGoEnv
, gomod2nix ? pkgs.gomod2nix
}:
{ pkgs ? (let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in import (fetchTree nixpkgs.locked) {
overlays = [ (import "${fetchTree gomod2nix.locked}/overlay.nix") ];
}), mkGoEnv ? pkgs.mkGoEnv, gomod2nix ? pkgs.gomod2nix }:

let
goEnv = mkGoEnv { pwd = ./.; };
in
pkgs.mkShell {
let goEnv = mkGoEnv { pwd = ./.; };
in pkgs.mkShell {
packages = with pkgs; [
goEnv
gomod2nix
Expand Down

0 comments on commit 1a0b77f

Please sign in to comment.