👷 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 /result
/target /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 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
matrix-sdk = "0.4.1" matrix-sdk = "0.5.0"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }

24
flake.lock generated
View File

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

View File

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