diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4cbc85b --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1760038930, + "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d093cd5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: let + supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; + forEachSupportedSystem = f: + nixpkgs.lib.genAttrs supportedSystems (system: + f { + pkgs = import nixpkgs { + inherit system; + }; + }); + in { + devShells = forEachSupportedSystem ({pkgs}: { + default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + go + gopls + deltachat-rpc-server + ]; + }; + # not core included, for when you want to set it to a local core checkout via $PATH + # you can start this with `nix develop .#no_core` + no_core = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + go + gopls + ]; + }; + }); + }; +} diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index b624872..117504f 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/usr/bin/env bash echo "Checking code with gofmt..." OUTPUT=`gofmt -d .`