Skip to content

Commit f34bf92

Browse files
committed
chore: nix flake
1 parent f501cf9 commit f34bf92

4 files changed

Lines changed: 78 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,5 @@ dmypy.json
134134
# Pyre type checker
135135
.pyre/
136136

137-
.history/
137+
.history/
138+
*result*

flake.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
description = "A fully-featured FRED Command Line Interface & Python API wrapper";
3+
4+
inputs = {
5+
# Latest stable Nixpkgs
6+
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
7+
};
8+
9+
outputs =
10+
{ self, nixpkgs }:
11+
let
12+
# Systems supported
13+
allSystems = [
14+
"x86_64-linux" # 64-bit Intel/AMD Linux
15+
"aarch64-linux" # 64-bit ARM Linux
16+
"x86_64-darwin" # 64-bit Intel macOS
17+
"aarch64-darwin" # 64-bit ARM macOS
18+
];
19+
20+
# Helper to provide system-specific attributes
21+
forAllSystems =
22+
f:
23+
nixpkgs.lib.genAttrs allSystems (
24+
system:
25+
f {
26+
pkgs = import nixpkgs { inherit system; };
27+
}
28+
);
29+
in
30+
{
31+
packages = forAllSystems (
32+
{ pkgs }:
33+
{
34+
default =
35+
let
36+
python = pkgs.python3;
37+
in
38+
python.pkgs.buildPythonApplication {
39+
name = "fred-py-api";
40+
version = "1.2.1";
41+
buildInputs = with python.pkgs; [ pip setuptools wheel ];
42+
propagatedBuildInputs = with python.pkgs; [ click requests ];
43+
doCheck = false;
44+
pyproject = true;
45+
src = ./.;
46+
};
47+
}
48+
);
49+
};
50+
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fred-py-api"
7-
version = "1.2.0"
7+
version = "1.2.1"
88
authors = [
99
{ name="Zachary Spar", email="zachspar@gmail.com" },
1010
]

0 commit comments

Comments
 (0)