Skip to content

Commit

Permalink
nix: shell -> flake
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <me@sumnerevans.com>
  • Loading branch information
sumnerevans committed Dec 27, 2023
1 parent c345091 commit fb18dce
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
if [[ $(uname -s) == "Linux" && $(uname --kernel-version | grep "NixOS") ]]; then
echo "The best OS (NixOS) has been detected. Using nice tools."
use nix
if ! has nix_direnv_version || ! nix_direnv_version 3.0.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.0/direnvrc" "sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
fi

use flake
fi
61 changes: 61 additions & 0 deletions flake.lock

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

33 changes: 33 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
description = "mautrix-signal development environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
(flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
LIBCLANG_PATH = "${pkgs.llvmPackages_11.libclang.lib}/lib";

buildInputs = with pkgs; [
clang
cmake
gnumake
protobuf
rust-cbindgen
rustup
olm

go_1_20
go-tools
gotools

pre-commit
];
};
}));
}
20 changes: 0 additions & 20 deletions shell.nix

This file was deleted.

0 comments on commit fb18dce

Please sign in to comment.