File tree Expand file tree Collapse file tree 6 files changed +142
-0
lines changed
Expand file tree Collapse file tree 6 files changed +142
-0
lines changed Original file line number Diff line number Diff line change 1+ use nix
Original file line number Diff line number Diff line change 11/target
2+ result
3+ .direnv
4+ .envrc.local
5+
6+ * ~
7+ * .bak
8+ * .orig
9+ * .sw [a-z ]
10+ * .tmp
Original file line number Diff line number Diff line change 1+ ( import (
2+ let
3+ fc = ( builtins . fromJSON ( builtins . readFile ./flake.lock ) ) . nodes . flake-compat . locked ;
4+ in
5+ fetchTarball {
6+ url = fc . url or "https://github.com/edolstra/flake-compat/archive/${ fc . rev } .tar.gz" ;
7+ sha256 = fc . narHash ;
8+ }
9+ ) { src = ./. ; } ) . defaultNix
Original file line number Diff line number Diff line change 1+ {
2+ description = "Terminal-based Sefaria query tool" ;
3+
4+ inputs = {
5+ nixpkgs . url = "github:nixos/nixpkgs/nixpkgs-unstable" ;
6+ flake-compat = {
7+ url = "github:edolstra/flake-compat" ;
8+ flake = false ;
9+ } ;
10+ } ;
11+
12+ outputs =
13+ inputs :
14+ let
15+ forEachSystem =
16+ f :
17+ inputs . nixpkgs . lib . genAttrs [
18+ "x86_64-linux"
19+ "x86_64-darwin"
20+ "aarch64-linux"
21+ "aarch64-darwin"
22+ ] ( system : f ( import inputs . nixpkgs { inherit system ; } ) ) ;
23+ in
24+ {
25+ packages = forEachSystem ( pkgs : {
26+ default = pkgs . callPackage (
27+ {
28+ lib ,
29+ openssl ,
30+ pkg-config ,
31+ rustPlatform ,
32+ } :
33+ let
34+ manifest = ( lib . importTOML ./Cargo.toml ) . package ;
35+ in
36+ rustPlatform . buildRustPackage {
37+ pname = manifest . name ;
38+ inherit ( manifest ) version ;
39+ src = lib . cleanSource ./. ;
40+ cargoLock . lockFile = ./Cargo.lock ;
41+ nativeBuildInputs = [ pkg-config ] ;
42+ buildInputs = [ openssl ] ;
43+ }
44+ ) { } ;
45+ } ) ;
46+ devShells = forEachSystem ( pkgs : {
47+ default = pkgs . callPackage (
48+ {
49+ cargo ,
50+ clippy ,
51+ mkShellNoCC ,
52+ rust-analyzer ,
53+ rustc ,
54+ rustfmt ,
55+ rustPlatform ,
56+ } :
57+ mkShellNoCC {
58+ packages = [
59+ cargo
60+ clippy
61+ rust-analyzer
62+ rustc
63+ rustfmt
64+ ] ;
65+ RUST_SRC_PATH = "${ rustPlatform . rustLibSrc } " ;
66+ }
67+ ) { } ;
68+ } ) ;
69+ } ;
70+ }
Original file line number Diff line number Diff line change 1+ ( import (
2+ let
3+ fc = ( builtins . fromJSON ( builtins . readFile ./flake.lock ) ) . nodes . flake-compat . locked ;
4+ in
5+ fetchTarball {
6+ url = fc . url or "https://github.com/edolstra/flake-compat/archive/${ fc . rev } .tar.gz" ;
7+ sha256 = fc . narHash ;
8+ }
9+ ) { src = ./. ; } ) . shellNix
You can’t perform that action at this time.
0 commit comments