di-tui/flake.nix

30 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-24 06:56:25 +00:00
{
description = "A simple terminal player for di.fm";
2024-01-15 22:54:23 +00:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.gomod2nix.url = "github:nix-community/gomod2nix";
inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils";
outputs = { self, nixpkgs, flake-utils, gomod2nix }:
(flake-utils.lib.eachDefaultSystem
(system:
2023-08-24 06:56:25 +00:00
let
2024-01-15 22:54:23 +00:00
pkgs = nixpkgs.legacyPackages.${system};
2023-08-24 06:56:25 +00:00
2024-01-15 22:54:23 +00:00
# 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;
2023-08-24 06:56:25 +00:00
in
{
2024-01-15 22:54:23 +00:00
packages.default = callPackage ./. {
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
2023-08-24 06:56:25 +00:00
};
2024-01-15 22:54:23 +00:00
devShells.default = callPackage ./shell.nix {
inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix;
};
})
);
2023-08-24 06:56:25 +00:00
}