Skip to content

Commit

Permalink
refactor: avoid dependency on Nix channels (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshesOfEther authored Mar 22, 2024
1 parent c019f3f commit 5bf6a8f
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: NixOS Package Building
on:
push:
branches: [ main ]
pull_request:
pull_request:
branches: [ main ]

jobs:
Expand All @@ -13,8 +13,6 @@ jobs:
- uses: actions/[email protected]

- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.11

- name: build-stregsystemet
run: nix build -f ./pkgs/stregsystemet
run: nix build .#stregsystemet
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
}
];
};

packages."${system}".stregsystemet = pkgs.callPackage ./pkgs/stregsystemet {};
};
}
6 changes: 3 additions & 3 deletions pkgs/stregsystemet/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:
let
env = pkgs.python3.withPackages (py: with py; [
pillow
Expand All @@ -16,14 +16,14 @@ let
in pkgs.stdenv.mkDerivation {
pname = "stregsystemet";
name = "stregsystemet";

src = pkgs.fetchFromGitHub {
owner = "f-klubben";
repo = "stregsystemet";
rev = "af0efd806ae743b0e8a9639376c4a31b81d61cd2";
sha256 = "sha256-0IwvGMyVd91h7bECTEqL2XydVewJZC+soctLnzTFASo=";
};

installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/stregsystemet
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/certifi.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "certifi";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/chardet.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "chardet";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/stregsystemet/dependencies/coverage.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "Coverage";
Expand All @@ -13,5 +13,5 @@ pkgs.python3Packages.buildPythonPackage {
checkInputs = [];
nativeBuildInputs = [];
propagatedBuildInputs = [];

}
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/django-appconf.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "django-appconf";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/django-debug-toolbar.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "django-debug-toolbar";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/django-select2.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "Django-Select2";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/django.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "Django";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/freezegun.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "freezegun";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/idna.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "idna";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/pillow.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "Pillow";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/python-dateutil.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "python-dateutil";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/pytz.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "pytz";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/qrcode.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "qrcode";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/regex.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "regex";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/requests.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "requests";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/six.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "six";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/sqlparse.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "sqlparse";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stregsystemet/dependencies/urllib3.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs ? import <nixpkgs> {}}:
{pkgs}:

pkgs.python3Packages.buildPythonPackage {
pname = "urllib3";
Expand Down

0 comments on commit 5bf6a8f

Please sign in to comment.