Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Feb 18, 2024
0 parents commit 1798125
Show file tree
Hide file tree
Showing 9 changed files with 894 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
16 changes: 16 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "build"

on:
push:
branches: [ main ]
tags: [ '*' ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- run: nix flake check
- run: nix build -L
17 changes: 17 additions & 0 deletions .github/workflows/deadnix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "deadnix"

on:
push:
branches: [ main ]
tags: [ '*' ]
pull_request:

jobs:
deadnix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: astro/deadnix-action@main
with:
flags: "-l"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/result
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# arouteserver.nix

Nix derivation for [arouteserver](https://github.com/pierky/arouteserver).

## Usage

```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
arouteserver = {
url = "github:dd-ix/arouteserver.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, arouteserver, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
modules = [
arouteserver.nixosModules.default
{ nixpkgs.overlays = [ arouteserver.overlays.default ]; }
];
};
};
};
}
```
59 changes: 59 additions & 0 deletions derivation.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ pkgs }:

let
aggregate6 = pkgs.python3Packages.buildPythonPackage rec {
pname = "aggregate6";
version = "1.0.12";
format = "pyproject";

src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-vg14uOhPltsvxn0XlV0W9gy9dq3+vZpi/h3Hytmyc9k=";
};

nativeBuildInputs = with pkgs.python3Packages; [
setuptools
];

nativeCheckInputs = with pkgs.python3Packages; [
mock
coverage
nose
];

propagatedBuildInputs = with pkgs.python3Packages; [
py-radix-sr
];

# TODO: execute tests
doCheck = true;
};
in
pkgs.python3Packages.buildPythonPackage rec {
pname = "arouteserver";
version = "1.21.5";
format = "pyproject";

src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-S/2eFfIRL26OaMUZQ0B628tmWjyaLqQCUmGTVqBBSsA=";
};

nativeBuildInputs = with pkgs.python3Packages; [
setuptools
];

propagatedBuildInputs = with pkgs.python3Packages; [
aggregate6
jinja2
pyyaml
requests
packaging
urllib3
# WHAT??? -> https://github.com/search?q=repo%3Apierky%2Farouteserver%20pkg_resources&type=code
setuptools
];

doCheck = false;
}

61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = (import nixpkgs) {
inherit system;
};
in
{
packages = rec {
arouteserver = pkgs.callPackage ./derivation.nix { };
default = arouteserver;
};
}
) // {
overlays.default = _: prev: {
arouteserver = self.packages."${prev.system}".arouteserver;
};
};
}

0 comments on commit 1798125

Please sign in to comment.