mirror of
https://github.com/RoBaertschi/tt.git
synced 2025-04-15 21:43:30 +00:00
formatted
This commit is contained in:
parent
e0f2da3174
commit
ee2d23e97f
34
flake.nix
34
flake.nix
@ -1,14 +1,14 @@
|
||||
# ml2 ts=2 sts=2 sw=2
|
||||
|
||||
{
|
||||
description = "A simple Go package";
|
||||
|
||||
# Nixpkgs / NixOS version to use.
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
# to work with older version of flakes
|
||||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
||||
|
||||
@ -23,25 +23,31 @@
|
||||
|
||||
# Nixpkgs instantiated for supported system types.
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
|
||||
|
||||
in {
|
||||
# Provide some binary packages for selected system types.
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
in {
|
||||
tt = pkgs.callPackage ./nix/package.nix {version = version;};
|
||||
});
|
||||
|
||||
# Add dependencies that are only needed for development
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ go gopls gotools go-tools qbe (if system == "x86_64-linux" then [fasm] else []) ];
|
||||
buildInputs = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
gotools
|
||||
go-tools
|
||||
qbe
|
||||
(
|
||||
if system == "x86_64-linux"
|
||||
then [fasm]
|
||||
else []
|
||||
)
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
# ml2 ts=2 sts=2 sw=2
|
||||
|
||||
with import <nixpkgs> {};
|
||||
{version ? "HEAD"}: callPackage ./package.nix {inherit version;}
|
||||
|
@ -1,5 +1,9 @@
|
||||
# ml2 ts=2 sts=2 sw=2
|
||||
{buildGoModule, version ? "HEAD"}: buildGoModule {
|
||||
{
|
||||
buildGoModule,
|
||||
version ? "HEAD",
|
||||
}:
|
||||
buildGoModule {
|
||||
pname = "tt";
|
||||
inherit version;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user