👷 fix nix build

This commit is contained in:
James Walker 2022-06-27 19:27:32 -04:00
parent 5fbb4cba3d
commit 42002d624e
Signed by: walkah
GPG Key ID: 3C127179D6086E93
6 changed files with 651 additions and 749 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/result
/target
/.direnv

1358
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
matrix-sdk = "0.4.1"
matrix-sdk = "0.5.0"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }

24
flake.lock generated
View File

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1649096192,
"narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=",
"lastModified": 1655042882,
"narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=",
"owner": "nix-community",
"repo": "naersk",
"rev": "d626f73332a8f587b613b0afe7293dd0777be07d",
"rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f",
"type": "github"
},
"original": {
@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1649961138,
"narHash": "sha256-8ZCPrazs+qd2V8Elw84lIWuk0kKfVQ8Ei/19gahURhM=",
"lastModified": 1656250965,
"narHash": "sha256-B5wj+k8uSe9YNijcTW7BHYAZzrzFQq5NMpmrnOGvxqo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d08394e7cd5c7431a1e8f53b7f581e74ee909548",
"rev": "9a17f325397d137ac4d219ecbd5c7f15154422f4",
"type": "github"
},
"original": {
@ -34,11 +34,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1649961138,
"narHash": "sha256-8ZCPrazs+qd2V8Elw84lIWuk0kKfVQ8Ei/19gahURhM=",
"lastModified": 1656250965,
"narHash": "sha256-B5wj+k8uSe9YNijcTW7BHYAZzrzFQq5NMpmrnOGvxqo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d08394e7cd5c7431a1e8f53b7f581e74ee909548",
"rev": "9a17f325397d137ac4d219ecbd5c7f15154422f4",
"type": "github"
},
"original": {
@ -57,11 +57,11 @@
},
"utils": {
"locked": {
"lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"lastModified": 1656065134,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github"
},
"original": {

View File

@ -10,6 +10,11 @@
let
pkgs = nixpkgs.legacyPackages."${system}";
naersk-lib = naersk.lib."${system}";
macOS =
if pkgs.stdenv.isDarwin then
[ pkgs.darwin.apple_sdk.frameworks.Security ]
else
[ ];
in
rec {
# `nix build`
@ -18,17 +23,18 @@
root = ./.;
buildInputs = with pkgs; [ cmake libiconv ];
};
defaultPackage = packages.zat;
packages.default = packages.zat;
# `nix run`
apps.zat = utils.lib.mkApp {
drv = packages.zat;
};
defaultApp = apps.zat;
apps.default = apps.zat;
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ];
devShells.default = pkgs.mkShell {
name = "zat";
nativeBuildInputs = with pkgs; [ cmake libiconv rustup ] ++ macOS;
};
});
}